From 3055addadbe9bfb2365006a1c13fd342a8d30d52 Mon Sep 17 00:00:00 2001 From: Dimitri Sivanich Date: Fri, 31 Mar 2006 02:31:20 -0800 Subject: [PATCH] [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 Signed-off-by: Thomas Gleixner Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- kernel/hrtimer.c | 3 +++ 1 file changed, 3 insertions(+) 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(); -- 2.20.1