diff options
author | Ingo Molnar <mingo@elte.hu> | 2008-05-12 15:43:53 +0200 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2008-05-30 14:16:10 +0200 |
commit | 7a14ce1d8c1d3a6118d406e64eaf9aa70375e085 (patch) | |
tree | 01a0d9f785a849fc4242d024bd1afa7deb7c1bf6 /kernel/time | |
parent | 916941b2bfd9c4a8b66855f198ae16c3f51ef570 (diff) | |
download | op-kernel-dev-7a14ce1d8c1d3a6118d406e64eaf9aa70375e085.zip op-kernel-dev-7a14ce1d8c1d3a6118d406e64eaf9aa70375e085.tar.gz |
nohz: reduce jiffies polling overhead
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'kernel/time')
-rw-r--r-- | kernel/time/tick-sched.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/kernel/time/tick-sched.c b/kernel/time/tick-sched.c index b854a89..cb75394 100644 --- a/kernel/time/tick-sched.c +++ b/kernel/time/tick-sched.c @@ -48,6 +48,13 @@ static void tick_do_update_jiffies64(ktime_t now) unsigned long ticks = 0; ktime_t delta; + /* + * Do a quick check without holding xtime_lock: + */ + delta = ktime_sub(now, last_jiffies_update); + if (delta.tv64 < tick_period.tv64) + return; + /* Reevalute with xtime_lock held */ write_seqlock(&xtime_lock); |