sched: Resched proper CPU on yield_to()
authorVenkatesh Pallipadi <venki@google.com>
Wed, 2 Mar 2011 00:28:21 +0000 (16:28 -0800)
committerIngo Molnar <mingo@elte.hu>
Fri, 4 Mar 2011 10:14:31 +0000 (11:14 +0100)
commit6d1cafd8b56ea726c10a5a104de57cc3ed8fa953
tree638ba81859114b2bda8b4899cf73cc20a8a31553
parentc02aa73b1d18e43cfd79c2f193b225e84ca497c8
sched: Resched proper CPU on yield_to()

yield_to_task_fair() has code to resched the CPU of yielding task when the
intention is to resched the CPU of the task that is being yielded to.

Change here fixes the problem and also makes the resched conditional on
rq != p_rq.

Signed-off-by: Venkatesh Pallipadi <venki@google.com>
Reviewed-by: Rik van Riel <riel@redhat.com>
Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
LKML-Reference: <1299025701-22168-1-git-send-email-venki@google.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
kernel/sched.c
kernel/sched_fair.c