Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=8465e792e82c567b80358e38732164b770ed4b7f
Commit:     8465e792e82c567b80358e38732164b770ed4b7f
Parent:     ddc972975091ba5f839bf24d0f9ef54fe90ee741
Author:     Ingo Molnar <[EMAIL PROTECTED]>
AuthorDate: Mon Oct 15 17:00:11 2007 +0200
Committer:  Ingo Molnar <[EMAIL PROTECTED]>
CommitDate: Mon Oct 15 17:00:11 2007 +0200

    sched: entity_key() fix
    
    entity_key() fix - we'd occasionally end up with a 0 vruntime
    in the !initial case.
    
    Signed-off-by: Ingo Molnar <[EMAIL PROTECTED]>
    Signed-off-by: Peter Zijlstra <[EMAIL PROTECTED]>
---
 kernel/sched_fair.c |   17 ++++++++++-------
 1 files changed, 10 insertions(+), 7 deletions(-)

diff --git a/kernel/sched_fair.c b/kernel/sched_fair.c
index 8ea4c9b..926491f 100644
--- a/kernel/sched_fair.c
+++ b/kernel/sched_fair.c
@@ -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;
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to