sched: old sleeper bonus
authorPeter Zijlstra <a.p.zijlstra@chello.nl>
Wed, 19 Mar 2008 10:43:36 +0000 (11:43 +0100)
committerIngo Molnar <mingo@elte.hu>
Sat, 19 Apr 2008 17:44:59 +0000 (19:44 +0200)
Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
kernel/sched.c
kernel/sched_fair.c

index 521b89b01480666875ff26c6c1b2cfaf6fb5649a..070eefdd90f56cfd8ad31b981d8ffcc57b38d05e 100644 (file)
@@ -680,6 +680,7 @@ enum {
        SCHED_FEAT_SYNC_WAKEUPS         = 32,
        SCHED_FEAT_HRTICK               = 64,
        SCHED_FEAT_DOUBLE_TICK          = 128,
+       SCHED_FEAT_NORMALIZED_SLEEPER   = 256,
 };
 
 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_SYNC_WAKEUPS         * 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)
 
index 290cf770b71252675b4756a8e5af15f10d1939fa..022e036f2c3e19412362e489166cea491393d7b4 100644 (file)
@@ -501,8 +501,11 @@ 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)) {
-                       vruntime -= calc_delta_fair(sysctl_sched_latency,
-                                                   &cfs_rq->load);
+                       if (sched_feat(NORMALIZED_SLEEPER))
+                               vruntime -= calc_delta_fair(sysctl_sched_latency,
+                                               &cfs_rq->load);
+                       else
+                               vruntime -= sysctl_sched_latency;
                }
 
                /* ensure we never gain time by being placed backwards. */