]> git.baikalelectronics.ru Git - kernel.git/commit
[PATCH] i386: improve sched_clock() on i686
authorIngo Molnar <mingo@elte.hu>
Tue, 13 Feb 2007 12:26:22 +0000 (13:26 +0100)
committerAndi Kleen <andi@basil.nowhere.org>
Tue, 13 Feb 2007 12:26:22 +0000 (13:26 +0100)
commite19a30b45b08b24a39087465ff98d902aa2b53e6
treee9f486276e878505b267a67fcfaa279b9539e54e
parentf97e092bf29067b74a3711300c505f72747f73b0
[PATCH] i386: improve sched_clock() on i686

Clean up sched_clock() on i686: it will use the TSC if available and falls
back to jiffies only if the user asked for it to be disabled via notsc or
the CPU calibration code didnt figure out the right cpu_khz.

This generally makes the scheduler timestamps more finegrained, on all
hardware.  (the current scheduler is pretty resistant against asynchronous
sched_clock() values on different CPUs, it will allow at most up to a jiffy
of jitter.)

Also simplify sched_clock()'s check for TSC availability: propagate the
desire and ability to use the TSC into the tsc_disable flag, previously
this flag only indicated whether the notsc option was passed.  This makes
the rare low-res sched_clock() codepath a single branch off a read-mostly
flag.

Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Andi Kleen <ak@suse.de>
arch/i386/kernel/tsc.c
include/asm-i386/bugs.h