summaryrefslogtreecommitdiff
path: root/kernel
diff options
context:
space:
mode:
authorDimitri Sivanich <sivanich@sgi.com>2006-03-31 02:31:20 -0800
committerLinus Torvalds <torvalds@g5.osdl.org>2006-03-31 12:18:58 -0800
commit3055addadbe9bfb2365006a1c13fd342a8d30d52 (patch)
tree0efcbd4a4e1d129beeb2dee3649951bea0462052 /kernel
parent669d7868ae414cdb7b7e5df375dc8e4b47f26f6d (diff)
downloadlinux-3.10-3055addadbe9bfb2365006a1c13fd342a8d30d52.tar.gz
linux-3.10-3055addadbe9bfb2365006a1c13fd342a8d30d52.tar.bz2
linux-3.10-3055addadbe9bfb2365006a1c13fd342a8d30d52.zip
[PATCH] hrtimer: call get_softirq_time() only when necessary in run_hrtimer_queue()
It seems that run_hrtimer_queue() is calling get_softirq_time() more often than it needs to. With this patch, it only calls get_softirq_time() if there's a pending timer. Signed-off-by: Dimitri Sivanich <sivanich@sgi.com> Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'kernel')
-rw-r--r--kernel/hrtimer.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/kernel/hrtimer.c b/kernel/hrtimer.c
index 49cbf7cffeb..f181ff4dd32 100644
--- a/kernel/hrtimer.c
+++ b/kernel/hrtimer.c
@@ -606,6 +606,9 @@ static inline void run_hrtimer_queue(struct hrtimer_base *base)
{
struct rb_node *node;
+ if (!base->first)
+ return;
+
if (base->get_softirq_time)
base->softirq_time = base->get_softirq_time();