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 <mingo@elte.hu>

+2 -3
+2 -3
kernel/sched_fair.c
··· 837 struct task_struct *curr = rq->curr; 838 struct cfs_rq *cfs_rq = task_cfs_rq(curr); 839 struct sched_entity *se = &curr->se, *pse = &p->se; 840 - s64 delta, gran; 841 842 if (unlikely(rt_prio(p->prio))) { 843 update_rq_clock(rq); ··· 860 pse = parent_entity(pse); 861 } 862 863 - delta = se->vruntime - pse->vruntime; 864 gran = sysctl_sched_wakeup_granularity; 865 if (unlikely(se->load.weight != NICE_0_LOAD)) 866 gran = calc_delta_fair(gran, &se->load); 867 868 - if (delta > gran) 869 resched_task(curr); 870 } 871
··· 837 struct task_struct *curr = rq->curr; 838 struct cfs_rq *cfs_rq = task_cfs_rq(curr); 839 struct sched_entity *se = &curr->se, *pse = &p->se; 840 + unsigned long gran; 841 842 if (unlikely(rt_prio(p->prio))) { 843 update_rq_clock(rq); ··· 860 pse = parent_entity(pse); 861 } 862 863 gran = sysctl_sched_wakeup_granularity; 864 if (unlikely(se->load.weight != NICE_0_LOAD)) 865 gran = calc_delta_fair(gran, &se->load); 866 867 + if (pse->vruntime + gran < se->vruntime) 868 resched_task(curr); 869 } 870