timer fixes
Linus,
Please pull the latest timers-fixes-for-linus git tree from:
git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip.git timers-fixes-for-linus
Special mention for this commit:
hrtimers: increase clock min delta threshold while interrupt hanging
We found it useful in the case where a very slow (or very emulated) system is overwhelmed with HZ irqs - we get a kernel message and some throttling, instead of a hard lockup in essence. If that kind of approach is not acceptable we can remove this patch and resend the other fixes.
Thanks,
Ingo
------------------>
Frederic Weisbecker (1):
hrtimers: increase clock min delta threshold while interrupt hanging
Sebastien Dugue (1):
hrtimers: allow the hot-unplugging of all cpus
Thomas Gleixner (1):
hrtimer: prevent negative expiry value after clock_was_set()
include/linux/clockchips.h | 1 + kernel/hrtimer.c | 41 ++++++++++++++++++++++++++++++++++++++++- kernel/time/tick-common.c | 26 +++++++++++++++++++------- 3 files changed, 60 insertions(+), 8 deletions(-)
include/linux/clockchips.h +1 -0
@@ -36,6 +36,7 @@ enum clock_event_nofitiers {CLOCK_EVT_NOTIFY_BROADCAST_EXIT ,CLOCK_EVT_NOTIFY_SUSPEND ,CLOCK_EVT_NOTIFY_RESUME , +CLOCK_EVT_NOTIFY_CPU_DYING , CLOCK_EVT_NOTIFY_CPU_DEAD, };
kernel/hrtimer.c +40 -1
77 lines not on this page · raw message
kernel/time/tick-common.c +19 -7
@@ -274,6 +274,21 @@ out_bc: }/* +* Transfer the do_timer job away from a dying cpu. +* +* Called with interrupts disabled. +*/ +static void tick_handover_do_timer (int *cpup) +{ +if (*cpup == tick_do_timer_cpu) { +int cpu =cpumask_first (cpu_online_mask); + + tick_do_timer_cpu = (cpu < nr_cpu_ids) ? cpu : +TICK_DO_TIMER_NONE ; + } +} + +/* * Shutdown an event device on a given cpu: * * This is called on a life CPU, when a CPU is dead. So we cannot
@@ -297,13 +312,6 @@ static void tick_shutdown(unsigned int *cpup)clockevents_exchange_device (dev,NULL ); td->evtdev =NULL ; } -/* Transfer the do_timer job away from this cpu */ -if (*cpup == tick_do_timer_cpu) { -int cpu =cpumask_first (cpu_online_mask); - - tick_do_timer_cpu = (cpu < nr_cpu_ids) ? cpu : -TICK_DO_TIMER_NONE ; - }spin_unlock_irqrestore (&tick_device_lock, flags); }
@@ -357,6 +365,10 @@ static int tick_notify(struct notifier_block *nb, unsigned long reason,tick_broadcast_oneshot_control (reason);break ; +case CLOCK_EVT_NOTIFY_CPU_DYING : +tick_handover_do_timer (dev); +break ; +case CLOCK_EVT_NOTIFY_CPU_DEAD :tick_shutdown_broadcast_oneshot (dev);tick_shutdown_broadcast (dev);