diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2014-04-17 19:19:10 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2014-04-17 19:19:10 -0400 |
commit | 87a54cae0ba094de2ddb7e5f429fd32b965a2fbf (patch) | |
tree | c8a990e39250a2c3ee8b47448d4252fc3da55c9b /kernel | |
parent | 81cef0fe19e086ff6abfd45e92246f68ffa0185f (diff) | |
parent | 27630532ef5ead28b98cfe28d8f95222ef91c2b7 (diff) |
Merge branch 'timers-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pull timer fixes from Thomas Gleixner:
"Viresh unearthed the following three hickups in the timer/timekeeping
code:
- Negated check for the result of a clock event selection
- A missing early exit in the jiffies update path which causes
update_wall_time to be called for nothing causing lock contention
and wasted cycles in the timer interrupt
- Checking a variable in the NOHZ code enable code for true which can
only be set by that very code after the check succeeds. That
results in a rock solid runtime disablement of that feature"
* 'timers-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
tick-sched: Check tick_nohz_enabled in tick_nohz_switch_to_nohz()
tick-sched: Don't call update_wall_time() when delta is lesser than tick_period
tick-common: Fix wrong check in tick_check_replacement()
Diffstat (limited to 'kernel')
-rw-r--r-- | kernel/time/tick-common.c | 2 | ||||
-rw-r--r-- | kernel/time/tick-sched.c | 5 |
2 files changed, 5 insertions, 2 deletions
diff --git a/kernel/time/tick-common.c b/kernel/time/tick-common.c index 015661279b68..0a0608edeb26 100644 --- a/kernel/time/tick-common.c +++ b/kernel/time/tick-common.c | |||
@@ -276,7 +276,7 @@ static bool tick_check_preferred(struct clock_event_device *curdev, | |||
276 | bool tick_check_replacement(struct clock_event_device *curdev, | 276 | bool tick_check_replacement(struct clock_event_device *curdev, |
277 | struct clock_event_device *newdev) | 277 | struct clock_event_device *newdev) |
278 | { | 278 | { |
279 | if (tick_check_percpu(curdev, newdev, smp_processor_id())) | 279 | if (!tick_check_percpu(curdev, newdev, smp_processor_id())) |
280 | return false; | 280 | return false; |
281 | 281 | ||
282 | return tick_check_preferred(curdev, newdev); | 282 | return tick_check_preferred(curdev, newdev); |
diff --git a/kernel/time/tick-sched.c b/kernel/time/tick-sched.c index 9f8af69c67ec..6558b7ac112d 100644 --- a/kernel/time/tick-sched.c +++ b/kernel/time/tick-sched.c | |||
@@ -84,6 +84,9 @@ static void tick_do_update_jiffies64(ktime_t now) | |||
84 | 84 | ||
85 | /* Keep the tick_next_period variable up to date */ | 85 | /* Keep the tick_next_period variable up to date */ |
86 | tick_next_period = ktime_add(last_jiffies_update, tick_period); | 86 | tick_next_period = ktime_add(last_jiffies_update, tick_period); |
87 | } else { | ||
88 | write_sequnlock(&jiffies_lock); | ||
89 | return; | ||
87 | } | 90 | } |
88 | write_sequnlock(&jiffies_lock); | 91 | write_sequnlock(&jiffies_lock); |
89 | update_wall_time(); | 92 | update_wall_time(); |
@@ -967,7 +970,7 @@ static void tick_nohz_switch_to_nohz(void) | |||
967 | struct tick_sched *ts = &__get_cpu_var(tick_cpu_sched); | 970 | struct tick_sched *ts = &__get_cpu_var(tick_cpu_sched); |
968 | ktime_t next; | 971 | ktime_t next; |
969 | 972 | ||
970 | if (!tick_nohz_active) | 973 | if (!tick_nohz_enabled) |
971 | return; | 974 | return; |
972 | 975 | ||
973 | local_irq_disable(); | 976 | local_irq_disable(); |