sched: entity_key() fix
[deliverable/linux.git] / kernel / sched_fair.c
index 8ea4c9b3e4112e0323d315b60ba64380e719f4ee..926491f7f8037ea5e9d4cdf8bf35bdc897262f9f 100644 (file)
@@ -479,13 +479,16 @@ place_entity(struct cfs_rq *cfs_rq, struct sched_entity *se, int initial)
        if (initial && sched_feat(START_DEBIT))
                vruntime += __sched_vslice(cfs_rq->nr_running + 1);
 
-       if (!initial && sched_feat(NEW_FAIR_SLEEPERS)) {
-               s64 latency = cfs_rq->min_vruntime - se->last_min_vruntime;
-               if (latency < 0 || !cfs_rq->nr_running)
-                       latency = 0;
-               else
-                       latency = min_t(s64, latency, sysctl_sched_latency);
-               vruntime -= latency;
+       if (!initial) {
+               if (sched_feat(NEW_FAIR_SLEEPERS)) {
+                       s64 latency = cfs_rq->min_vruntime - se->last_min_vruntime;
+                       if (latency < 0 || !cfs_rq->nr_running)
+                               latency = 0;
+                       else
+                               latency = min_t(s64, latency, sysctl_sched_latency);
+                       vruntime -= latency;
+               }
+               vruntime = max(vruntime, se->vruntime);
        }
 
        se->vruntime = vruntime;
This page took 0.026991 seconds and 5 git commands to generate.