diff options
author | Venkatesh Pallipadi <venki@google.com> | 2011-03-01 19:28:21 -0500 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2011-03-04 05:14:31 -0500 |
commit | 6d1cafd8b56ea726c10a5a104de57cc3ed8fa953 (patch) | |
tree | 638ba81859114b2bda8b4899cf73cc20a8a31553 /kernel/sched_fair.c | |
parent | c02aa73b1d18e43cfd79c2f193b225e84ca497c8 (diff) |
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>
Diffstat (limited to 'kernel/sched_fair.c')
-rw-r--r-- | kernel/sched_fair.c | 4 |
1 files changed, 0 insertions, 4 deletions
diff --git a/kernel/sched_fair.c b/kernel/sched_fair.c index 1438e13cf8be..3f7ec9e27ee1 100644 --- a/kernel/sched_fair.c +++ b/kernel/sched_fair.c | |||
@@ -1987,10 +1987,6 @@ static bool yield_to_task_fair(struct rq *rq, struct task_struct *p, bool preemp | |||
1987 | /* Tell the scheduler that we'd really like pse to run next. */ | 1987 | /* Tell the scheduler that we'd really like pse to run next. */ |
1988 | set_next_buddy(se); | 1988 | set_next_buddy(se); |
1989 | 1989 | ||
1990 | /* Make p's CPU reschedule; pick_next_entity takes care of fairness. */ | ||
1991 | if (preempt) | ||
1992 | resched_task(rq->curr); | ||
1993 | |||
1994 | yield_task_fair(rq); | 1990 | yield_task_fair(rq); |
1995 | 1991 | ||
1996 | return true; | 1992 | return true; |