diff options
author | Peter Zijlstra <a.p.zijlstra@chello.nl> | 2009-11-27 15:44:43 +0100 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2010-09-20 13:17:58 -0700 |
commit | 7b8a5273c87b4229bb83bbb1282424e2af0af214 (patch) | |
tree | 37315367526079330115644d831662678db15eda /kernel/sched.c | |
parent | 55eedcb291d0c7dd1a56090f72c80360fbb40d2f (diff) |
sched: Clean up ttwu() rq locking
commit ab19cb23313733c55e0517607844b86720b35f5f upstream
Since set_task_clock() doesn't rely on rq->clock anymore we can simplyfy
the mess in ttwu().
Optimize things a bit by not fiddling with the IRQ state there.
Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
LKML-Reference: <new-submission>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Mike Galbraith <efault@gmx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'kernel/sched.c')
-rw-r--r-- | kernel/sched.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/kernel/sched.c b/kernel/sched.c index e3d92940c66..89bce0258d9 100644 --- a/kernel/sched.c +++ b/kernel/sched.c @@ -2379,16 +2379,14 @@ static int try_to_wake_up(struct task_struct *p, unsigned int state, if (task_contributes_to_load(p)) rq->nr_uninterruptible--; p->state = TASK_WAKING; - task_rq_unlock(rq, &flags); + __task_rq_unlock(rq); cpu = select_task_rq(p, SD_BALANCE_WAKE, wake_flags); if (cpu != orig_cpu) set_task_cpu(p, cpu); - rq = task_rq_lock(p, &flags); - - if (rq != orig_rq) - update_rq_clock(rq); + rq = __task_rq_lock(p); + update_rq_clock(rq); WARN_ON(p->state != TASK_WAKING); cpu = task_cpu(p); |