diff options
author | Dmitry Adamushko <dmitry.adamushko@gmail.com> | 2008-06-30 18:22:34 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2008-07-02 20:46:15 -0700 |
commit | 0758c2f30b75419fbe5e0ec6dfc892bbc0687f57 (patch) | |
tree | fbdb9529c15c6eb24b2a15e28b3d0720d2991085 /kernel | |
parent | 1e9a615bfce7996ea4d815d45d364b47ac6a74e8 (diff) |
sched: fix cpu hotplug
Commit 79c537998d143b127c8c662a403c3356cb885f1c upstream
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>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'kernel')
-rw-r--r-- | kernel/sched.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/kernel/sched.c b/kernel/sched.c index 1e4596c68dd..c54077ca1ed 100644 --- a/kernel/sched.c +++ b/kernel/sched.c @@ -5728,6 +5728,7 @@ static void migrate_dead_tasks(unsigned int dead_cpu) next = pick_next_task(rq, rq->curr); if (!next) break; + next->sched_class->put_prev_task(rq, next); migrate_dead(dead_cpu, next); } |