]> www.infradead.org Git - users/jedix/linux-maple.git/commit
sched: Pass correct scheduling policy to __setscheduler_class
authorAboorva Devarajan <aboorvad@linux.ibm.com>
Fri, 25 Oct 2024 18:50:20 +0000 (00:20 +0530)
committerPeter Zijlstra <peterz@infradead.org>
Tue, 29 Oct 2024 12:57:51 +0000 (13:57 +0100)
commit5db91545ef8150c45a526675ef99e8998b648a41
tree1a1d0ca5b8ecc76b06cee82fbdd5ba51dd7c95c2
parent9c70b2a33cd2aa6a5a59c5523ef053bd42265209
sched: Pass correct scheduling policy to __setscheduler_class

Commit 98442f0ccd82 ("sched: Fix delayed_dequeue vs
switched_from_fair()") overlooked that __setscheduler_prio(), now
__setscheduler_class() relies on p->policy for task_should_scx(), and
moved the call before __setscheduler_params() updates it, causing it
to be using the old p->policy value.

Resolve this by changing task_should_scx() to take the policy itself
instead of a task pointer, such that __sched_setscheduler() can pass
in the updated policy.

Fixes: 98442f0ccd82 ("sched: Fix delayed_dequeue vs switched_from_fair()")
Signed-off-by: Aboorva Devarajan <aboorvad@linux.ibm.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Acked-by: Tejun Heo <tj@kernel.org>
kernel/sched/core.c
kernel/sched/ext.c
kernel/sched/ext.h
kernel/sched/sched.h
kernel/sched/syscalls.c