aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/sched.c
diff options
context:
space:
mode:
authorDmitry Adamushko <dmitry.adamushko@gmail.com>2008-06-28 18:16:56 -0400
committerIngo Molnar <mingo@elte.hu>2008-06-29 02:50:21 -0400
commit79c537998d143b127c8c662a403c3356cb885f1c (patch)
treeed358cd2f78741b17f87cd74517250f434a34e19 /kernel/sched.c
parent543cf4cb3fe6f6cae3651ba918b9c56200b257d0 (diff)
sched: fix cpu hotplug
the CPU hotplug problems (crashes under high-volume unplug+replug tests) seem to be related to migrate_dead_tasks(). Firstly I added traces to see all tasks being migrated with migrate_live_tasks() and migrate_dead_tasks(). On my setup the problem pops up (the one with "se == NULL" in the loop of pick_next_task_fair()) shortly after the traces indicate that some has been migrated with migrate_dead_tasks()). btw., I can reproduce it much faster now with just a plain cpu down/up loop. [disclaimer] Well, unless I'm really missing something important in this late hour [/desclaimer] pick_next_task() is not something appropriate for migrate_dead_tasks() :-) the following change seems to eliminate the problem on my setup (although, I kept it running only for a few minutes to get a few messages indicating migrate_dead_tasks() does move tasks and the system is still ok) Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'kernel/sched.c')
-rw-r--r--kernel/sched.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/kernel/sched.c b/kernel/sched.c
index 3aaa5c8cb421..a66e85639de2 100644
--- a/kernel/sched.c
+++ b/kernel/sched.c
@@ -5887,6 +5887,7 @@ static void migrate_dead_tasks(unsigned int dead_cpu)
5887 next = pick_next_task(rq, rq->curr); 5887 next = pick_next_task(rq, rq->curr);
5888 if (!next) 5888 if (!next)
5889 break; 5889 break;
5890 next->sched_class->put_prev_task(rq, next);
5890 migrate_dead(dead_cpu, next); 5891 migrate_dead(dead_cpu, next);
5891 5892
5892 } 5893 }