timer fixes for 3.10
Subsystems (4)
Linus,
please pull the latest timers-urgent-for-linus git tree from:
git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git timers-urgent-for-linus
Content:
* Cure for not using zalloc in the first place, which leads to random crashes with CPUMASK_OFF_STACK.
* Revert a user space visible change which broke udev
* Add a missing cpu_online early return introduced by the new full dyntick conversions
* Plug a long standing race in the timer wheel cpu hotplug code. Sigh...
* Cleanup NOHZ per cpu data on cpu down to prevent stale data on cpu up.
Thanks,
tglx
------------------>
John Stultz (1):
time: Revert ALWAYS_USE_PERSISTENT_CLOCK compile time optimizaitons
Thomas Gleixner (3):
tick: Use zalloc_cpumask_var for allocating offstack cpumasks
tick: Cleanup NOHZ per cpu data on cpu down
tick: Don't invoke tick_nohz_stop_sched_tick() if the cpu is offline
Tirupathi Reddy (1):
timer: Don't reinitialize the cpu base lock during CPU_UP_PREPARE
arch/x86/Kconfig | 1 - drivers/rtc/Kconfig | 2 -- include/linux/time.h | 4 ---- kernel/time/Kconfig | 5 ----- kernel/time/tick-broadcast.c | 10 +++++----- kernel/time/tick-sched.c | 3 ++- kernel/timer.c | 2 +- 7 files changed, 8 insertions(+), 19 deletions(-)
arch/x86/Kconfig +0 -1
@@ -108,7 +108,6 @@ config X86 select GENERIC_CLOCKEVENTS_BROADCAST if X86_64 || (X86_32 && X86_LOCAL_APIC) select GENERIC_TIME_VSYSCALL if X86_64 select KTIME_SCALAR if X86_32 - select ALWAYS_USE_PERSISTENT_CLOCK select GENERIC_STRNCPY_FROM_USER select GENERIC_STRNLEN_USER select HAVE_CONTEXT_TRACKING if X86_64
drivers/rtc/Kconfig +0 -2
@@ -20,7 +20,6 @@ if RTC_CLASS config RTC_HCTOSYS bool "Set system time from RTC on startup and resume" default y - depends on !ALWAYS_USE_PERSISTENT_CLOCK help If you say yes here, the system time (wall clock) will be set using the value read from a specified RTC device. This is useful to avoid
@@ -29,7 +28,6 @@ config RTC_HCTOSYS config RTC_SYSTOHC bool "Set the RTC time based on NTP synchronization" default y - depends on !ALWAYS_USE_PERSISTENT_CLOCK help If you say yes here, the system time (wall clock) will be stored in the RTC specified by RTC_HCTOSYS_DEVICE approximately every 11
include/linux/time.h +0 -4
@@ -117,14 +117,10 @@ static inline bool timespec_valid_strict(const struct timespec *ts)extern bool persistent_clock_exist; -#ifdef ALWAYS_USE_PERSISTENT_CLOCK -#define has_persistent_clock () true -#else static inline bool has_persistent_clock (void ) {return persistent_clock_exist; } -#endif extern void read_persistent_clock (struct timespec *ts);extern void read_boot_clock (struct timespec *ts);
kernel/time/Kconfig +0 -5
@@ -12,11 +12,6 @@ config CLOCKSOURCE_WATCHDOG config ARCH_CLOCKSOURCE_DATA bool -# Platforms has a persistent clock -config ALWAYS_USE_PERSISTENT_CLOCK - bool - default n - # Timekeeping vsyscall support config GENERIC_TIME_VSYSCALL bool
kernel/time/tick-broadcast.c +5 -5
@@ -785,11 +785,11 @@ bool tick_broadcast_oneshot_available(void)void __init tick_broadcast_init (void ) { -alloc_cpumask_var (&tick_broadcast_mask,GFP_NOWAIT ); -alloc_cpumask_var (&tmpmask,GFP_NOWAIT ); +zalloc_cpumask_var (&tick_broadcast_mask,GFP_NOWAIT ); +zalloc_cpumask_var (&tmpmask,GFP_NOWAIT );#ifdef CONFIG_TICK_ONESHOT -alloc_cpumask_var (&tick_broadcast_oneshot_mask,GFP_NOWAIT ); -alloc_cpumask_var (&tick_broadcast_pending_mask,GFP_NOWAIT ); -alloc_cpumask_var (&tick_broadcast_force_mask,GFP_NOWAIT ); +zalloc_cpumask_var (&tick_broadcast_oneshot_mask,GFP_NOWAIT ); +zalloc_cpumask_var (&tick_broadcast_pending_mask,GFP_NOWAIT ); +zalloc_cpumask_var (&tick_broadcast_force_mask,GFP_NOWAIT );#endif }
kernel/time/tick-sched.c +2 -1
@@ -469,6 +469,7 @@ static bool can_stop_idle_tick(int cpu, struct tick_sched *ts)if (unlikely (!cpu_online (cpu))) {if (cpu == tick_do_timer_cpu) tick_do_timer_cpu =TICK_DO_TIMER_NONE ; +return false; }if (unlikely (ts->nohz_mode ==NOHZ_MODE_INACTIVE ))
@@ -904,7 +905,7 @@ void tick_cancel_sched_timer(int cpu)hrtimer_cancel (&ts->sched_timer);# endif - ts->nohz_mode = NOHZ_MODE_INACTIVE; + memset(ts, 0, sizeof(*ts)); }#endif
kernel/timer.c +1 -1
@@ -1539,12 +1539,12 @@ static int __cpuinit init_timers_cpu(int cpu) boot_done =1 ; base = &boot_tvec_bases; } +spin_lock_init (&base->lock); tvec_base_done[cpu] =1 ; }else { base =per_cpu (tvec_bases, cpu); } -spin_lock_init (&base->lock);for (j =0 ; j <TVN_SIZE ; j++) {INIT_LIST_HEAD (base->tv5.vec + j);