]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
sched: clean up the wakeup preempt check
authorIngo Molnar <mingo@elte.hu>
Fri, 9 Nov 2007 21:39:39 +0000 (22:39 +0100)
committerIngo Molnar <mingo@elte.hu>
Fri, 9 Nov 2007 21:39:39 +0000 (22:39 +0100)
clean up the wakeup preemption check. No code changed:

   text    data     bss     dec     hex filename
  44227    3326      36   47589    b9e5 sched.o.before
  44227    3326      36   47589    b9e5 sched.o.after

Signed-off-by: Ingo Molnar <mingo@elte.hu>
kernel/sched_fair.c

index a3badf52bba2352e489c94bc768c9617bc4cb707..d558716a9add732835397d49f7c29c47812535a5 100644 (file)
@@ -852,20 +852,21 @@ static void check_preempt_wakeup(struct rq *rq, struct task_struct *p)
        if (unlikely(p->policy == SCHED_BATCH))
                return;
 
-       if (sched_feat(WAKEUP_PREEMPT)) {
-               while (!is_same_group(se, pse)) {
-                       se = parent_entity(se);
-                       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 (!sched_feat(WAKEUP_PREEMPT))
+               return;
 
-               if (delta > gran)
-                       resched_task(curr);
+       while (!is_same_group(se, pse)) {
+               se = parent_entity(se);
+               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)
+               resched_task(curr);
 }
 
 static struct task_struct *pick_next_task_fair(struct rq *rq)