summaryrefslogtreecommitdiff
path: root/kernel/sched/rt.c
diff options
context:
space:
mode:
authorPeter Zijlstra <peterz@infradead.org>2024-11-01 14:16:10 +0100
committerPeter Zijlstra <peterz@infradead.org>2025-10-16 11:13:52 +0200
commit6455ad5346c9cf755fa9dda6e326c4028fb3c853 (patch)
treeb6f122e57fdac235588b6bec950c824ec5d424f4 /kernel/sched/rt.c
parent1ae5f5dfe5adc64a90b1b0ab5bd9bd7c9d140c28 (diff)
downloadlinux-next-6455ad5346c9cf755fa9dda6e326c4028fb3c853.tar.gz
linux-next-6455ad5346c9cf755fa9dda6e326c4028fb3c853.zip
sched: Move sched_class::prio_changed() into the change pattern
Move sched_class::prio_changed() into the change pattern. And while there, extend it with sched_class::get_prio() in order to fix the deadline sitation. Suggested-by: Tejun Heo <tj@kernel.org> Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org> Reviewed-by: Juri Lelli <juri.lelli@redhat.com> Acked-by: Tejun Heo <tj@kernel.org> Acked-by: Vincent Guittot <vincent.guittot@linaro.org>
Diffstat (limited to 'kernel/sched/rt.c')
-rw-r--r--kernel/sched/rt.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/kernel/sched/rt.c b/kernel/sched/rt.c
index 6b2e8112c570..c2347e485dc6 100644
--- a/kernel/sched/rt.c
+++ b/kernel/sched/rt.c
@@ -2437,11 +2437,14 @@ static void switched_to_rt(struct rq *rq, struct task_struct *p)
* us to initiate a push or pull.
*/
static void
-prio_changed_rt(struct rq *rq, struct task_struct *p, int oldprio)
+prio_changed_rt(struct rq *rq, struct task_struct *p, u64 oldprio)
{
if (!task_on_rq_queued(p))
return;
+ if (p->prio == oldprio)
+ return;
+
if (task_current_donor(rq, p)) {
/*
* If our priority decreases while running, we