Commit 7a14ce1d8c1d3a6118d406e64eaf9aa70375e085

Authored by Ingo Molnar
1 parent 916941b2bf

nohz: reduce jiffies polling overhead

Signed-off-by: Ingo Molnar <mingo@elte.hu>

Showing 1 changed file with 7 additions and 0 deletions Side-by-side Diff

kernel/time/tick-sched.c
... ... @@ -48,6 +48,13 @@
48 48 unsigned long ticks = 0;
49 49 ktime_t delta;
50 50  
  51 + /*
  52 + * Do a quick check without holding xtime_lock:
  53 + */
  54 + delta = ktime_sub(now, last_jiffies_update);
  55 + if (delta.tv64 < tick_period.tv64)
  56 + return;
  57 +
51 58 /* Reevalute with xtime_lock held */
52 59 write_seqlock(&xtime_lock);
53 60