hrtimer: reduce calls to hrtimer_get_softirq_time()
authorDimitri Sivanich <sivanich@sgi.com>
Fri, 18 Apr 2008 20:39:00 +0000 (13:39 -0700)
committerThomas Gleixner <tglx@linutronix.de>
Mon, 21 Apr 2008 05:59:51 +0000 (07:59 +0200)
commit833883d9ac4cfb31c1c4419335e68e6895a05b6b
tree8266c8216aa988aedb6a25925d99c9e269467e7e
parent833df317f9ada91488898b005f4641bb674a3bae
hrtimer: reduce calls to hrtimer_get_softirq_time()

It seems that hrtimer_run_queues() is calling hrtimer_get_softirq_time() more
often than it needs to.  This can cause frequent contention on systems with
large numbers of processors/cores.

With this patch, hrtimer_run_queues only calls hrtimer_get_softirq_time() if
there is a pending timer in one of the hrtimer bases, and only once.

This also combines hrtimer_run_queues() and the inline run_hrtimer_queue()
into one function.

[ tglx@linutronix.de: coding style ]

Signed-off-by: Dimitri Sivanich <sivanich@sgi.com>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
kernel/hrtimer.c