Commit 77d9cc44 authored by Ingo Molnar's avatar Ingo Molnar

sched: clean up the wakeup preempt check

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: default avatarIngo Molnar <mingo@elte.hu>
parent 8bc6767a
...@@ -852,20 +852,21 @@ static void check_preempt_wakeup(struct rq *rq, struct task_struct *p) ...@@ -852,20 +852,21 @@ static void check_preempt_wakeup(struct rq *rq, struct task_struct *p)
if (unlikely(p->policy == SCHED_BATCH)) if (unlikely(p->policy == SCHED_BATCH))
return; return;
if (sched_feat(WAKEUP_PREEMPT)) { if (!sched_feat(WAKEUP_PREEMPT))
while (!is_same_group(se, pse)) { return;
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) while (!is_same_group(se, pse)) {
resched_task(curr); 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) static struct task_struct *pick_next_task_fair(struct rq *rq)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment