diff options
author | Oleg Nesterov <oleg@tv-sign.ru> | 2007-10-17 02:30:56 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-10-17 11:43:03 -0400 |
commit | d2da272a4e581e831e3567a37ef167686f1ea1d3 (patch) | |
tree | 4afa26683994ed19086578a23ae6db688867f176 /kernel/sched.c | |
parent | f7b4cddcc5aca03e80e357360c9424dfba5056c2 (diff) |
migration_call(CPU_DEAD): use spin_lock_irq() instead of task_rq_lock()
Change migration_call(CPU_DEAD) to use direct spin_lock_irq() instead of
task_rq_lock(rq->idle), rq->idle can't change its task_rq().
This makes the code a bit more symmetrical with migrate_dead_tasks()'s path
which uses spin_lock_irq/spin_unlock_irq.
Signed-off-by: Oleg Nesterov <oleg@tv-sign.ru>
Cc: Cliff Wickman <cpw@sgi.com>
Cc: Gautham R Shenoy <ego@in.ibm.com>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Srivatsa Vaddagiri <vatsa@in.ibm.com>
Cc: Akinobu Mita <akinobu.mita@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'kernel/sched.c')
-rw-r--r-- | kernel/sched.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/kernel/sched.c b/kernel/sched.c index c747bc9f3c24..c4889abc00b6 100644 --- a/kernel/sched.c +++ b/kernel/sched.c | |||
@@ -5457,14 +5457,14 @@ migration_call(struct notifier_block *nfb, unsigned long action, void *hcpu) | |||
5457 | kthread_stop(rq->migration_thread); | 5457 | kthread_stop(rq->migration_thread); |
5458 | rq->migration_thread = NULL; | 5458 | rq->migration_thread = NULL; |
5459 | /* Idle task back to normal (off runqueue, low prio) */ | 5459 | /* Idle task back to normal (off runqueue, low prio) */ |
5460 | rq = task_rq_lock(rq->idle, &flags); | 5460 | spin_lock_irq(&rq->lock); |
5461 | update_rq_clock(rq); | 5461 | update_rq_clock(rq); |
5462 | deactivate_task(rq, rq->idle, 0); | 5462 | deactivate_task(rq, rq->idle, 0); |
5463 | rq->idle->static_prio = MAX_PRIO; | 5463 | rq->idle->static_prio = MAX_PRIO; |
5464 | __setscheduler(rq, rq->idle, SCHED_NORMAL, 0); | 5464 | __setscheduler(rq, rq->idle, SCHED_NORMAL, 0); |
5465 | rq->idle->sched_class = &idle_sched_class; | 5465 | rq->idle->sched_class = &idle_sched_class; |
5466 | migrate_dead_tasks(cpu); | 5466 | migrate_dead_tasks(cpu); |
5467 | task_rq_unlock(rq, &flags); | 5467 | spin_unlock_irq(&rq->lock); |
5468 | migrate_nr_uninterruptible(rq); | 5468 | migrate_nr_uninterruptible(rq); |
5469 | BUG_ON(rq->nr_running != 0); | 5469 | BUG_ON(rq->nr_running != 0); |
5470 | 5470 | ||