Commit 54e88fad authored by Amit K. Arora's avatar Amit K. Arora Committed by Ingo Molnar

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
Signed-off-by: default avatarAmit Arora <>
Signed-off-by: default avatarGautham R Shenoy <>
Acked-by: default avatarTejun Heo <>
Signed-off-by: default avatarPeter Zijlstra <>
Cc: Thomas Gleixner <>
LKML-Reference: <>
Signed-off-by: default avatarIngo Molnar <>
parent 67a3e12b
......@@ -321,7 +321,7 @@ static int __cpuinit cpu_stop_cpu_callback(struct notifier_block *nfb,
case CPU_DEAD:
struct cpu_stop_work *work;
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment