Skip to content

Commit 54e88fa

Browse files
Amit K. AroraIngo Molnar
authored andcommitted
sched: Make sure timers have migrated before killing the migration_thread
Problem: In a stress test where some heavy tests were running along with regular CPU offlining and onlining, a hang was observed. The system seems to be hung at a point where migration_call() tries to kill the migration_thread of the dying CPU, which just got moved to the current CPU. This migration thread does not get a chance to run (and die) since rt_throttled is set to 1 on current, and it doesn't get cleared as the hrtimer which is supposed to reset the rt bandwidth (sched_rt_period_timer) is tied to the CPU which we just marked dead! Solution: This patch pushes the killing of migration thread to "CPU_POST_DEAD" event. By then all the timers (including sched_rt_period_timer) should have got migrated (along with other callbacks). Signed-off-by: Amit Arora <aarora@in.ibm.com> Signed-off-by: Gautham R Shenoy <ego@in.ibm.com> Acked-by: Tejun Heo <tj@kernel.org> Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl> Cc: Thomas Gleixner <tglx@linutronix.de> LKML-Reference: <20100525132346.GA14986@amitarora.in.ibm.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
1 parent 67a3e12 commit 54e88fa

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

kernel/stop_machine.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -321,7 +321,7 @@ static int __cpuinit cpu_stop_cpu_callback(struct notifier_block *nfb,
321321

322322
#ifdef CONFIG_HOTPLUG_CPU
323323
case CPU_UP_CANCELED:
324-
case CPU_DEAD:
324+
case CPU_POST_DEAD:
325325
{
326326
struct cpu_stop_work *work;
327327

0 commit comments

Comments
 (0)