timer: Use timer->base for flag checks
authorJoonwoo Park <joonwoop@codeaurora.org>
Tue, 28 Apr 2015 02:21:49 +0000 (19:21 -0700)
committerThomas Gleixner <tglx@linutronix.de>
Tue, 5 May 2015 08:40:43 +0000 (10:40 +0200)
At present, internal_add_timer() examines flags with 'base' which doesn't
contain flags.  Examine with 'timer->base' to avoid unnecessary waking up
of nohz CPU when timer base has TIMER_DEFERRABLE set.

Signed-off-by: Joonwoo Park <joonwoop@codeaurora.org>
Cc: sboyd@codeaurora.org
Cc: skannan@codeaurora.org
Cc: John Stultz <john.stultz@linaro.org>
Link: http://lkml.kernel.org/r/1430187709-21087-1-git-send-email-joonwoop@codeaurora.org
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
kernel/time/timer.c

index 03f926c7a8eed6a826a7459fdc50c88225ae89ff..d4af7c56c95dbf093c4f24286dcc1f889e444d2c 100644 (file)
@@ -436,7 +436,7 @@ static void internal_add_timer(struct tvec_base *base, struct timer_list *timer)
         * require special care against races with idle_cpu(), lets deal
         * with that later.
         */
-       if (!tbase_get_deferrable(base) || tick_nohz_full_cpu(base->cpu))
+       if (!tbase_get_deferrable(timer->base) || tick_nohz_full_cpu(base->cpu))
                wake_up_nohz_cpu(base->cpu);
 }
 
This page took 0.026433 seconds and 5 git commands to generate.