Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 277383
b: refs/heads/master
c: 916671c
h: refs/heads/master
i:
  277381: f30bdbd
  277379: 840f86e
  277375: b37a1d9
v: v3
  • Loading branch information
Mike Galbraith authored and Ingo Molnar committed Dec 6, 2011
1 parent 844a110 commit 8b680d3
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 76854c7e8f3f4172fef091e78d88b3b751463ac6
refs/heads/master: 916671c08b7808aebec87cc56c85788e665b3c6b
7 changes: 7 additions & 0 deletions trunk/kernel/sched/core.c
Original file line number Diff line number Diff line change
Expand Up @@ -4547,6 +4547,13 @@ bool __sched yield_to(struct task_struct *p, bool preempt)
*/
if (preempt && rq != p_rq)
resched_task(p_rq->curr);
} else {
/*
* We might have set it in task_yield_fair(), but are
* not going to schedule(), so don't want to skip
* the next update.
*/
rq->skip_clock_update = 0;
}

out:
Expand Down
6 changes: 6 additions & 0 deletions trunk/kernel/sched/fair.c
Original file line number Diff line number Diff line change
Expand Up @@ -3075,6 +3075,12 @@ static void yield_task_fair(struct rq *rq)
* Update run-time statistics of the 'current'.
*/
update_curr(cfs_rq);
/*
* Tell update_rq_clock() that we've just updated,
* so we don't do microscopic update in schedule()
* and double the fastpath cost.
*/
rq->skip_clock_update = 1;
}

set_skip_buddy(se);
Expand Down

0 comments on commit 8b680d3

Please sign in to comment.