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

    sched: another wakeup_granularity fix
    
    unit mis-match: wakeup_gran was used against a vruntime
    
    Signed-off-by: Peter Zijlstra <[EMAIL PROTECTED]>
    Signed-off-by: Ingo Molnar <[EMAIL PROTECTED]>
---
 kernel/sched_fair.c |    7 +++++--
 1 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/kernel/sched_fair.c b/kernel/sched_fair.c
index f5f4917..3ecbfd0 100644
--- a/kernel/sched_fair.c
+++ b/kernel/sched_fair.c
@@ -818,7 +818,7 @@ static void check_preempt_wakeup(struct rq *rq, struct 
task_struct *p)
        struct task_struct *curr = rq->curr;
        struct cfs_rq *cfs_rq = task_cfs_rq(curr);
        struct sched_entity *se = &curr->se, *pse = &p->se;
-       s64 delta;
+       s64 delta, gran;
 
        if (unlikely(rt_prio(p->prio))) {
                update_rq_clock(rq);
@@ -833,8 +833,11 @@ static void check_preempt_wakeup(struct rq *rq, struct 
task_struct *p)
        }
 
        delta = se->vruntime - pse->vruntime;
+       gran = sysctl_sched_wakeup_granularity;
+       if (unlikely(se->load.weight != NICE_0_LOAD))
+               gran = calc_delta_fair(gran, &se->load);
 
-       if (delta > (s64)sysctl_sched_wakeup_granularity)
+       if (delta > gran)
                resched_task(curr);
 }
 
-
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