Sfoglia il codice sorgente

[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>
Dimitri Sivanich 19 anni fa
parent
commit
3055addadb
1 ha cambiato i file con 3 aggiunte e 0 eliminazioni
  1. 3 0
      kernel/hrtimer.c

+ 3 - 0
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();