diff options
author | Peter Zijlstra <peterz@infradead.org> | 2013-11-29 15:40:29 +0100 |
---|---|---|
committer | Ingo Molnar <mingo@kernel.org> | 2014-01-13 15:13:06 +0100 |
commit | 20d1c86a57762f0a33a78988e3fc8818316badd4 (patch) | |
tree | c200d1bf1394460a1c3b1cfb790773f8377543ba /kernel/sched/clock.c | |
parent | sched/clock, x86: Move some cyc2ns() code around (diff) | |
download | linux-20d1c86a57762f0a33a78988e3fc8818316badd4.tar.xz linux-20d1c86a57762f0a33a78988e3fc8818316badd4.zip |
sched/clock, x86: Rewrite cyc2ns() to avoid the need to disable IRQs
Use a ring-buffer like multi-version object structure which allows
always having a coherent object; we use this to avoid having to
disable IRQs while reading sched_clock() and avoids a problem when
getting an NMI while changing the cyc2ns data.
MAINLINE PRE POST
sched_clock_stable: 1 1 1
(cold) sched_clock: 329841 331312 257223
(cold) local_clock: 301773 310296 309889
(warm) sched_clock: 38375 38247 25280
(warm) local_clock: 100371 102713 85268
(warm) rdtsc: 27340 27289 24247
sched_clock_stable: 0 0 0
(cold) sched_clock: 382634 372706 301224
(cold) local_clock: 396890 399275 399870
(warm) sched_clock: 38194 38124 25630
(warm) local_clock: 143452 148698 129629
(warm) rdtsc: 27345 27365 24307
Signed-off-by: Peter Zijlstra <peterz@infradead.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Andrew Morton <akpm@linux-foundation.org>
Link: http://lkml.kernel.org/n/tip-s567in1e5ekq2nlyhn8f987r@git.kernel.org
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'kernel/sched/clock.c')
0 files changed, 0 insertions, 0 deletions