[PATCH 2/3] sched/rt: Remove unused rq argument from requeue_task_rt()

From: Zhan Xusheng

Date: Tue Aug 04 2026 - 08:50:29 EST


requeue_task_rt() takes a struct rq *rq argument but never uses it. It
requeues the RT scheduling entities via the rt_rq obtained from the
task's RT scheduling entity (&p->rt) with rt_rq_of_se(), not from @rq.
The argument has been redundant ever since RT group scheduling reworked
the requeue path to iterate the sched_rt_entity hierarchy.

Drop the unused argument and update the three callers. No functional
change.

Signed-off-by: Zhan Xusheng <zhanxusheng@xxxxxxxxxx>
---
kernel/sched/rt.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/kernel/sched/rt.c b/kernel/sched/rt.c
index e474c31d8fe6..ac4cdebf8679 100644
--- a/kernel/sched/rt.c
+++ b/kernel/sched/rt.c
@@ -1482,7 +1482,7 @@ requeue_rt_entity(struct rt_rq *rt_rq, struct sched_rt_entity *rt_se, int head)
}
}

-static void requeue_task_rt(struct rq *rq, struct task_struct *p, int head)
+static void requeue_task_rt(struct task_struct *p, int head)
{
struct sched_rt_entity *rt_se = &p->rt;
struct rt_rq *rt_rq;
@@ -1495,7 +1495,7 @@ static void requeue_task_rt(struct rq *rq, struct task_struct *p, int head)

static void yield_task_rt(struct rq *rq)
{
- requeue_task_rt(rq, rq->donor, 0);
+ requeue_task_rt(rq->donor, 0);
}

static int find_lowest_rq(struct task_struct *task);
@@ -1592,7 +1592,7 @@ static void check_preempt_equal_prio(struct rq *rq, struct task_struct *p)
* the current task but none can run 'p', so lets reschedule
* to try and push the current task away:
*/
- requeue_task_rt(rq, p, 1);
+ requeue_task_rt(p, 1);
resched_curr(rq);
}

@@ -2564,7 +2564,7 @@ static void task_tick_rt(struct rq *rq, struct task_struct *p, int queued)
*/
for_each_sched_rt_entity(rt_se) {
if (rt_se->run_list.prev != rt_se->run_list.next) {
- requeue_task_rt(rq, p, 0);
+ requeue_task_rt(p, 0);
resched_curr(rq);
return;
}
--
2.43.0