Commit 112f53f5 authored by Peter Zijlstra's avatar Peter Zijlstra Committed by Ingo Molnar

sched: old sleeper bonus

Signed-off-by: default avatarPeter Zijlstra <a.p.zijlstra@chello.nl>
Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
parent cd8ba7cd
...@@ -680,6 +680,7 @@ enum { ...@@ -680,6 +680,7 @@ enum {
SCHED_FEAT_SYNC_WAKEUPS = 32, SCHED_FEAT_SYNC_WAKEUPS = 32,
SCHED_FEAT_HRTICK = 64, SCHED_FEAT_HRTICK = 64,
SCHED_FEAT_DOUBLE_TICK = 128, SCHED_FEAT_DOUBLE_TICK = 128,
SCHED_FEAT_NORMALIZED_SLEEPER = 256,
}; };
const_debug unsigned int sysctl_sched_features = const_debug unsigned int sysctl_sched_features =
...@@ -690,7 +691,8 @@ const_debug unsigned int sysctl_sched_features = ...@@ -690,7 +691,8 @@ const_debug unsigned int sysctl_sched_features =
SCHED_FEAT_CACHE_HOT_BUDDY * 1 | SCHED_FEAT_CACHE_HOT_BUDDY * 1 |
SCHED_FEAT_SYNC_WAKEUPS * 1 | SCHED_FEAT_SYNC_WAKEUPS * 1 |
SCHED_FEAT_HRTICK * 1 | SCHED_FEAT_HRTICK * 1 |
SCHED_FEAT_DOUBLE_TICK * 0; SCHED_FEAT_DOUBLE_TICK * 0 |
SCHED_FEAT_NORMALIZED_SLEEPER * 1;
#define sched_feat(x) (sysctl_sched_features & SCHED_FEAT_##x) #define sched_feat(x) (sysctl_sched_features & SCHED_FEAT_##x)
......
...@@ -501,8 +501,11 @@ place_entity(struct cfs_rq *cfs_rq, struct sched_entity *se, int initial) ...@@ -501,8 +501,11 @@ place_entity(struct cfs_rq *cfs_rq, struct sched_entity *se, int initial)
if (!initial) { if (!initial) {
/* sleeps upto a single latency don't count. */ /* sleeps upto a single latency don't count. */
if (sched_feat(NEW_FAIR_SLEEPERS)) { if (sched_feat(NEW_FAIR_SLEEPERS)) {
if (sched_feat(NORMALIZED_SLEEPER))
vruntime -= calc_delta_fair(sysctl_sched_latency, vruntime -= calc_delta_fair(sysctl_sched_latency,
&cfs_rq->load); &cfs_rq->load);
else
vruntime -= sysctl_sched_latency;
} }
/* ensure we never gain time by being placed backwards. */ /* ensure we never gain time by being placed backwards. */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment