diff options
-rw-r--r-- | kernel/sched_fair.c | 9 | ||||
-rw-r--r-- | kernel/sched_features.h | 9 |
2 files changed, 16 insertions, 2 deletions
diff --git a/kernel/sched_fair.c b/kernel/sched_fair.c index a37f311f436e..acf16a8d934b 100644 --- a/kernel/sched_fair.c +++ b/kernel/sched_fair.c | |||
@@ -711,7 +711,7 @@ place_entity(struct cfs_rq *cfs_rq, struct sched_entity *se, int initial) | |||
711 | 711 | ||
712 | if (!initial) { | 712 | if (!initial) { |
713 | /* sleeps upto a single latency don't count. */ | 713 | /* sleeps upto a single latency don't count. */ |
714 | if (sched_feat(NEW_FAIR_SLEEPERS)) { | 714 | if (sched_feat(FAIR_SLEEPERS)) { |
715 | unsigned long thresh = sysctl_sched_latency; | 715 | unsigned long thresh = sysctl_sched_latency; |
716 | 716 | ||
717 | /* | 717 | /* |
@@ -725,6 +725,13 @@ place_entity(struct cfs_rq *cfs_rq, struct sched_entity *se, int initial) | |||
725 | task_of(se)->policy != SCHED_IDLE)) | 725 | task_of(se)->policy != SCHED_IDLE)) |
726 | thresh = calc_delta_fair(thresh, se); | 726 | thresh = calc_delta_fair(thresh, se); |
727 | 727 | ||
728 | /* | ||
729 | * Halve their sleep time's effect, to allow | ||
730 | * for a gentler effect of sleepers: | ||
731 | */ | ||
732 | if (sched_feat(GENTLE_FAIR_SLEEPERS)) | ||
733 | thresh >>= 1; | ||
734 | |||
728 | vruntime -= thresh; | 735 | vruntime -= thresh; |
729 | } | 736 | } |
730 | } | 737 | } |
diff --git a/kernel/sched_features.h b/kernel/sched_features.h index 70115c69c7a9..fd375675f834 100644 --- a/kernel/sched_features.h +++ b/kernel/sched_features.h | |||
@@ -3,7 +3,14 @@ | |||
3 | * considers the task to be running during that period. This gives it | 3 | * considers the task to be running during that period. This gives it |
4 | * a service deficit on wakeup, allowing it to run sooner. | 4 | * a service deficit on wakeup, allowing it to run sooner. |
5 | */ | 5 | */ |
6 | SCHED_FEAT(NEW_FAIR_SLEEPERS, 0) | 6 | SCHED_FEAT(FAIR_SLEEPERS, 1) |
7 | |||
8 | /* | ||
9 | * Only give sleepers 50% of their service deficit. This allows | ||
10 | * them to run sooner, but does not allow tons of sleepers to | ||
11 | * rip the spread apart. | ||
12 | */ | ||
13 | SCHED_FEAT(GENTLE_FAIR_SLEEPERS, 1) | ||
7 | 14 | ||
8 | /* | 15 | /* |
9 | * By not normalizing the sleep time, heavy tasks get an effective | 16 | * By not normalizing the sleep time, heavy tasks get an effective |