aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--kernel/sched.c4
-rw-r--r--kernel/sched_fair.c7
2 files changed, 8 insertions, 3 deletions
diff --git a/kernel/sched.c b/kernel/sched.c
index 521b89b01480..070eefdd90f5 100644
--- a/kernel/sched.c
+++ b/kernel/sched.c
@@ -680,6 +680,7 @@ enum {
680 SCHED_FEAT_SYNC_WAKEUPS = 32, 680 SCHED_FEAT_SYNC_WAKEUPS = 32,
681 SCHED_FEAT_HRTICK = 64, 681 SCHED_FEAT_HRTICK = 64,
682 SCHED_FEAT_DOUBLE_TICK = 128, 682 SCHED_FEAT_DOUBLE_TICK = 128,
683 SCHED_FEAT_NORMALIZED_SLEEPER = 256,
683}; 684};
684 685
685const_debug unsigned int sysctl_sched_features = 686const_debug unsigned int sysctl_sched_features =
@@ -690,7 +691,8 @@ const_debug unsigned int sysctl_sched_features =
690 SCHED_FEAT_CACHE_HOT_BUDDY * 1 | 691 SCHED_FEAT_CACHE_HOT_BUDDY * 1 |
691 SCHED_FEAT_SYNC_WAKEUPS * 1 | 692 SCHED_FEAT_SYNC_WAKEUPS * 1 |
692 SCHED_FEAT_HRTICK * 1 | 693 SCHED_FEAT_HRTICK * 1 |
693 SCHED_FEAT_DOUBLE_TICK * 0; 694 SCHED_FEAT_DOUBLE_TICK * 0 |
695 SCHED_FEAT_NORMALIZED_SLEEPER * 1;
694 696
695#define sched_feat(x) (sysctl_sched_features & SCHED_FEAT_##x) 697#define sched_feat(x) (sysctl_sched_features & SCHED_FEAT_##x)
696 698
diff --git a/kernel/sched_fair.c b/kernel/sched_fair.c
index 290cf770b712..022e036f2c3e 100644
--- a/kernel/sched_fair.c
+++ b/kernel/sched_fair.c
@@ -501,8 +501,11 @@ place_entity(struct cfs_rq *cfs_rq, struct sched_entity *se, int initial)
501 if (!initial) { 501 if (!initial) {
502 /* sleeps upto a single latency don't count. */ 502 /* sleeps upto a single latency don't count. */
503 if (sched_feat(NEW_FAIR_SLEEPERS)) { 503 if (sched_feat(NEW_FAIR_SLEEPERS)) {
504 vruntime -= calc_delta_fair(sysctl_sched_latency, 504 if (sched_feat(NORMALIZED_SLEEPER))
505 &cfs_rq->load); 505 vruntime -= calc_delta_fair(sysctl_sched_latency,
506 &cfs_rq->load);
507 else
508 vruntime -= sysctl_sched_latency;
506 } 509 }
507 510
508 /* ensure we never gain time by being placed backwards. */ 511 /* ensure we never gain time by being placed backwards. */