Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 163017
b: refs/heads/master
c: 51e0304
h: refs/heads/master
i:
  163015: 10db5ab
v: v3
  • Loading branch information
Ingo Molnar committed Sep 16, 2009
1 parent a7b6054 commit f3ed5c1
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 3 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: 59abf02644c45f1591e1374ee7bb45dc757fcb88
refs/heads/master: 51e0304ce6e55a6e59658558916b4f74da085ff0
9 changes: 8 additions & 1 deletion trunk/kernel/sched_fair.c
Original file line number Diff line number Diff line change
Expand Up @@ -711,7 +711,7 @@ place_entity(struct cfs_rq *cfs_rq, struct sched_entity *se, int initial)

if (!initial) {
/* sleeps upto a single latency don't count. */
if (sched_feat(NEW_FAIR_SLEEPERS)) {
if (sched_feat(FAIR_SLEEPERS)) {
unsigned long thresh = sysctl_sched_latency;

/*
Expand All @@ -725,6 +725,13 @@ place_entity(struct cfs_rq *cfs_rq, struct sched_entity *se, int initial)
task_of(se)->policy != SCHED_IDLE))
thresh = calc_delta_fair(thresh, se);

/*
* Halve their sleep time's effect, to allow
* for a gentler effect of sleepers:
*/
if (sched_feat(GENTLE_FAIR_SLEEPERS))
thresh >>= 1;

vruntime -= thresh;
}
}
Expand Down
9 changes: 8 additions & 1 deletion trunk/kernel/sched_features.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,14 @@
* considers the task to be running during that period. This gives it
* a service deficit on wakeup, allowing it to run sooner.
*/
SCHED_FEAT(NEW_FAIR_SLEEPERS, 0)
SCHED_FEAT(FAIR_SLEEPERS, 1)

/*
* Only give sleepers 50% of their service deficit. This allows
* them to run sooner, but does not allow tons of sleepers to
* rip the spread apart.
*/
SCHED_FEAT(GENTLE_FAIR_SLEEPERS, 1)

/*
* By not normalizing the sleep time, heavy tasks get an effective
Expand Down

0 comments on commit f3ed5c1

Please sign in to comment.