From 9db91525c335df4f06e3d83afebec193a4972b16 Mon Sep 17 00:00:00 2001 From: Thomas Gleixner Date: Sun, 16 Sep 2007 15:36:43 +0200 Subject: [PATCH] --- yaml --- r: 64984 b: refs/heads/master c: 5e41d0d60a534d2a5dc9772600a58f44c8d12506 h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/kernel/time/tick-sched.c | 12 ++++++++++++ 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/[refs] b/[refs] index 77f27b7e0366..895e4c8c5718 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 31d9b3938c0459e5e9755ce0a98ac1e24eeff972 +refs/heads/master: 5e41d0d60a534d2a5dc9772600a58f44c8d12506 diff --git a/trunk/kernel/time/tick-sched.c b/trunk/kernel/time/tick-sched.c index b416995b9757..8c3fef1db09c 100644 --- a/trunk/kernel/time/tick-sched.c +++ b/trunk/kernel/time/tick-sched.c @@ -160,6 +160,18 @@ void tick_nohz_stop_sched_tick(void) cpu = smp_processor_id(); ts = &per_cpu(tick_cpu_sched, cpu); + /* + * If this cpu is offline and it is the one which updates + * jiffies, then give up the assignment and let it be taken by + * the cpu which runs the tick timer next. If we don't drop + * this here the jiffies might be stale and do_timer() never + * invoked. + */ + if (unlikely(!cpu_online(cpu))) { + if (cpu == tick_do_timer_cpu) + tick_do_timer_cpu = -1; + } + if (unlikely(ts->nohz_mode == NOHZ_MODE_INACTIVE)) goto end;