Skip to content

Commit

Permalink
[PATCH] hrtimer: call get_softirq_time() only when necessary in run_h…
Browse files Browse the repository at this point in the history
…rtimer_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>
  • Loading branch information
Dimitri Sivanich authored and Linus Torvalds committed Mar 31, 2006
1 parent 669d786 commit 3055add
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions kernel/hrtimer.c
Original file line number Diff line number Diff line change
Expand Up @@ -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();

Expand Down

0 comments on commit 3055add

Please sign in to comment.