Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=502d26b524d8980f3ed80d9aec398e85671a8160
Commit:     502d26b524d8980f3ed80d9aec398e85671a8160
Parent:     77d9cc44b543fa831169e54c495ad06ef3a0c726
Author:     Ingo Molnar <[EMAIL PROTECTED]>
AuthorDate: Fri Nov 9 22:39:39 2007 +0100
Committer:  Ingo Molnar <[EMAIL PROTECTED]>
CommitDate: Fri Nov 9 22:39:39 2007 +0100

    sched: clean up the wakeup preempt check, #2
    
    clean up the preemption check to not use unnecessary 64-bit
    variables. This improves code size:
    
       text    data     bss     dec     hex filename
      44227    3326      36   47589    b9e5 sched.o.before
      44201    3326      36   47563    b9cb sched.o.after
    
    Signed-off-by: Ingo Molnar <[EMAIL PROTECTED]>
---
 kernel/sched_fair.c |    5 ++---
 1 files changed, 2 insertions(+), 3 deletions(-)

diff --git a/kernel/sched_fair.c b/kernel/sched_fair.c
index d558716..6c36147 100644
--- a/kernel/sched_fair.c
+++ b/kernel/sched_fair.c
@@ -837,7 +837,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, gran;
+       unsigned long gran;
 
        if (unlikely(rt_prio(p->prio))) {
                update_rq_clock(rq);
@@ -860,12 +860,11 @@ static void check_preempt_wakeup(struct rq *rq, struct 
task_struct *p)
                pse = parent_entity(pse);
        }
 
-       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 > gran)
+       if (pse->vruntime + gran < se->vruntime)
                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