Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 234566
b: refs/heads/master
c: 6d1cafd
h: refs/heads/master
v: v3
  • Loading branch information
Venkatesh Pallipadi authored and Ingo Molnar committed Mar 4, 2011
1 parent 2ae7de7 commit 4d4740d
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 6 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: c02aa73b1d18e43cfd79c2f193b225e84ca497c8
refs/heads/master: 6d1cafd8b56ea726c10a5a104de57cc3ed8fa953
9 changes: 8 additions & 1 deletion trunk/kernel/sched.c
Original file line number Diff line number Diff line change
Expand Up @@ -5522,8 +5522,15 @@ bool __sched yield_to(struct task_struct *p, bool preempt)
goto out;

yielded = curr->sched_class->yield_to_task(rq, p, preempt);
if (yielded)
if (yielded) {
schedstat_inc(rq, yld_count);
/*
* Make p's CPU reschedule; pick_next_entity takes care of
* fairness.
*/
if (preempt && rq != p_rq)
resched_task(p_rq->curr);
}

out:
double_rq_unlock(rq, p_rq);
Expand Down
4 changes: 0 additions & 4 deletions trunk/kernel/sched_fair.c
Original file line number Diff line number Diff line change
Expand Up @@ -1987,10 +1987,6 @@ static bool yield_to_task_fair(struct rq *rq, struct task_struct *p, bool preemp
/* Tell the scheduler that we'd really like pse to run next. */
set_next_buddy(se);

/* Make p's CPU reschedule; pick_next_entity takes care of fairness. */
if (preempt)
resched_task(rq->curr);

yield_task_fair(rq);

return true;
Expand Down

0 comments on commit 4d4740d

Please sign in to comment.