Skip to content

Commit

Permalink
sched: wakeup preemption fix
Browse files Browse the repository at this point in the history
wakeup preemption fix: do not make it dependent on p->prio.
Preemption purely depends on ->vruntime.

This improves preemption in mixed-nice-level workloads.

Signed-off-by: Ingo Molnar <mingo@elte.hu>
  • Loading branch information
Ingo Molnar committed Nov 9, 2007
1 parent 3e3e13f commit 8bc6767
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions kernel/sched_fair.c
Original file line number Diff line number Diff line change
Expand Up @@ -863,10 +863,8 @@ static void check_preempt_wakeup(struct rq *rq, struct task_struct *p)
if (unlikely(se->load.weight != NICE_0_LOAD))
gran = calc_delta_fair(gran, &se->load);

if (delta > gran) {
if (p->prio < curr->prio)
resched_task(curr);
}
if (delta > gran)
resched_task(curr);
}
}

Expand Down

0 comments on commit 8bc6767

Please sign in to comment.