diff options
| -rw-r--r-- | kernel/timer.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/kernel/timer.c b/kernel/timer.c index accfd241b9e5..b75e7893be14 100644 --- a/kernel/timer.c +++ b/kernel/timer.c | |||
| @@ -939,8 +939,15 @@ void add_timer_on(struct timer_list *timer, int cpu) | |||
| 939 | * with the timer by holding the timer base lock. This also | 939 | * with the timer by holding the timer base lock. This also |
| 940 | * makes sure that a CPU on the way to stop its tick can not | 940 | * makes sure that a CPU on the way to stop its tick can not |
| 941 | * evaluate the timer wheel. | 941 | * evaluate the timer wheel. |
| 942 | * | ||
| 943 | * Spare the IPI for deferrable timers on idle targets though. | ||
| 944 | * The next busy ticks will take care of it. Except full dynticks | ||
| 945 | * require special care against races with idle_cpu(), lets deal | ||
| 946 | * with that later. | ||
| 942 | */ | 947 | */ |
| 943 | wake_up_nohz_cpu(cpu); | 948 | if (!tbase_get_deferrable(timer->base) || tick_nohz_full_cpu(cpu)) |
| 949 | wake_up_nohz_cpu(cpu); | ||
| 950 | |||
| 944 | spin_unlock_irqrestore(&base->lock, flags); | 951 | spin_unlock_irqrestore(&base->lock, flags); |
| 945 | } | 952 | } |
| 946 | EXPORT_SYMBOL_GPL(add_timer_on); | 953 | EXPORT_SYMBOL_GPL(add_timer_on); |
