From: Ingo Molnar Date: Mon, 12 May 2008 13:43:53 +0000 (+0200) Subject: nohz: reduce jiffies polling overhead X-Git-Tag: v2.6.27-rc1~513^2~4 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7a14ce1d8c1d3a6118d406e64eaf9aa70375e085;p=linux-2.6 nohz: reduce jiffies polling overhead Signed-off-by: Ingo Molnar --- diff --git a/kernel/time/tick-sched.c b/kernel/time/tick-sched.c index b854a89559..cb75394ed0 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);