mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2025-01-06 05:06:29 +00:00
sched: Use set_next_task(.first) where required
Turns out the core_sched bits forgot to use the set_next_task(.first=true) variant. Notably: pick_next_task() := pick_task() + set_next_task(.first = true) Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org> Link: https://lore.kernel.org/r/20240813224015.614146342@infradead.org
This commit is contained in:
parent
75b6499024
commit
7d2180d9d9
@ -6010,7 +6010,7 @@ pick_next_task(struct rq *rq, struct task_struct *prev, struct rq_flags *rf)
|
||||
next = rq->core_pick;
|
||||
if (next != prev) {
|
||||
put_prev_task(rq, prev);
|
||||
set_next_task(rq, next);
|
||||
set_next_task_first(rq, next);
|
||||
}
|
||||
|
||||
rq->core_pick = NULL;
|
||||
@ -6184,7 +6184,7 @@ pick_next_task(struct rq *rq, struct task_struct *prev, struct rq_flags *rf)
|
||||
}
|
||||
|
||||
out_set_next:
|
||||
set_next_task(rq, next);
|
||||
set_next_task_first(rq, next);
|
||||
out:
|
||||
if (rq->core->core_forceidle_count && next == rq->idle)
|
||||
queue_core_balance(rq);
|
||||
|
@ -2363,6 +2363,10 @@ static inline void set_next_task(struct rq *rq, struct task_struct *next)
|
||||
next->sched_class->set_next_task(rq, next, false);
|
||||
}
|
||||
|
||||
static inline void set_next_task_first(struct rq *rq, struct task_struct *next)
|
||||
{
|
||||
next->sched_class->set_next_task(rq, next, true);
|
||||
}
|
||||
|
||||
/*
|
||||
* Helper to define a sched_class instance; each one is placed in a separate
|
||||
|
Loading…
Reference in New Issue
Block a user