[tip: sched/core] sched: Rename/clarify sched_class::task_tick(.queued) argument
From: tip-bot2 for Peter Zijlstra
Date: Mon Nov 09 2026 - 03:47:47 EST
The following commit has been merged into the sched/core branch of tip:
Commit-ID: 09ab8d5fce27bc995366754f284347450b8d9085
Gitweb: https://git.kernel.org/tip/09ab8d5fce27bc995366754f284347450b8d9085
Author: Peter Zijlstra <peterz@xxxxxxxxxxxxx>
AuthorDate: Tue, 29 Sep 2026 10:49:24 +02:00
Committer: Peter Zijlstra <peterz@xxxxxxxxxxxxx>
CommitterDate: Mon, 09 Nov 2026 09:39:55 +01:00
sched: Rename/clarify sched_class::task_tick(.queued) argument
For some reason the sched_class::task_tick() argument that indicates it being
an hrtick, is called @queued. I'm sure naming is hard and all, but lets fix
this.
Signed-off-by: Peter Zijlstra (Intel) <peterz@xxxxxxxxxxxxx>
Reviewed-by: Vincent Guittot <vincent.guittot@xxxxxxxxxx>
Reviewed-by: Kayra Cizmeci <kayracizmeci@xxxxxxxxx>
Link: https://patch.msgid.link/20260929085319.981147568@xxxxxxxxxxxxx
---
kernel/sched/deadline.c | 4 ++--
kernel/sched/ext/ext.c | 2 +-
kernel/sched/fair.c | 12 ++++++------
kernel/sched/idle.c | 2 +-
kernel/sched/rt.c | 2 +-
kernel/sched/sched.h | 2 +-
6 files changed, 12 insertions(+), 12 deletions(-)
diff --git a/kernel/sched/deadline.c b/kernel/sched/deadline.c
index dfae086..35345ae 100644
--- a/kernel/sched/deadline.c
+++ b/kernel/sched/deadline.c
@@ -2879,7 +2879,7 @@ static void put_prev_task_dl(struct rq *rq, struct task_struct *p, struct task_s
* and everything must be accessed through the @rq and @curr passed in
* parameters.
*/
-static void task_tick_dl(struct rq *rq, struct task_struct *p, int queued)
+static void task_tick_dl(struct rq *rq, struct task_struct *p, int hrtick)
{
update_curr_dl(rq);
@@ -2889,7 +2889,7 @@ static void task_tick_dl(struct rq *rq, struct task_struct *p, int queued)
* not being the leftmost task anymore. In that case NEED_RESCHED will
* be set and schedule() will start a new hrtick for the next task.
*/
- if (hrtick_enabled_dl(rq) && queued && p->dl.runtime > 0 &&
+ if (hrtick_enabled_dl(rq) && hrtick && p->dl.runtime > 0 &&
is_leftmost(&p->dl, &rq->dl))
start_hrtick_dl(rq, &p->dl);
}
diff --git a/kernel/sched/ext/ext.c b/kernel/sched/ext/ext.c
index f74ffb3..ebdf7b9 100644
--- a/kernel/sched/ext/ext.c
+++ b/kernel/sched/ext/ext.c
@@ -4486,7 +4486,7 @@ void scx_tick(struct rq *rq)
update_other_load_avgs(rq);
}
-static void task_tick_scx(struct rq *rq, struct task_struct *donor, int queued)
+static void task_tick_scx(struct rq *rq, struct task_struct *donor, int hrtick)
{
struct scx_sched *sch = scx_task_sched(donor);
diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c
index 0c8af1c..a9da1bc 100644
--- a/kernel/sched/fair.c
+++ b/kernel/sched/fair.c
@@ -6726,7 +6726,7 @@ static void put_prev_entity(struct cfs_rq *cfs_rq, struct sched_entity *prev)
}
static void
-entity_tick(struct cfs_rq *cfs_rq, struct sched_entity *curr, int queued)
+entity_tick(struct cfs_rq *cfs_rq, struct sched_entity *curr, int hrtick)
{
/*
* Update run-time statistics of the 'current'.
@@ -6741,10 +6741,10 @@ entity_tick(struct cfs_rq *cfs_rq, struct sched_entity *curr, int queued)
#ifdef CONFIG_SCHED_HRTICK
/*
- * queued ticks are scheduled to match the slice, so don't bother
+ * hrticks are scheduled to match the slice, so don't bother
* validating it and just reschedule.
*/
- if (queued) {
+ if (hrtick) {
resched_curr(rq_of(cfs_rq));
return;
}
@@ -15353,7 +15353,7 @@ static inline void task_tick_core(struct rq *rq, struct task_struct *curr) {}
* and everything must be accessed through the @rq and @curr passed in
* parameters.
*/
-static void task_tick_fair(struct rq *rq, struct task_struct *curr, int queued)
+static void task_tick_fair(struct rq *rq, struct task_struct *curr, int hrtick)
{
struct sched_entity *se = &curr->se;
@@ -15363,7 +15363,7 @@ static void task_tick_fair(struct rq *rq, struct task_struct *curr, int queued)
for_each_sched_entity(se) {
cfs_rq = cfs_rq_of(se);
- entity_tick(cfs_rq, se, queued);
+ entity_tick(cfs_rq, se, hrtick);
weight = __calc_prop_weight(cfs_rq, se, weight);
}
@@ -15372,7 +15372,7 @@ static void task_tick_fair(struct rq *rq, struct task_struct *curr, int queued)
reweight_eevdf(cfs_rq, se, weight, se->on_rq);
}
- if (queued)
+ if (hrtick)
return;
if (static_branch_unlikely(&sched_numa_balancing))
diff --git a/kernel/sched/idle.c b/kernel/sched/idle.c
index e0c10a5..f7dd151 100644
--- a/kernel/sched/idle.c
+++ b/kernel/sched/idle.c
@@ -542,7 +542,7 @@ dequeue_task_idle(struct rq *rq, struct task_struct *p, int flags)
* and everything must be accessed through the @rq and @curr passed in
* parameters.
*/
-static void task_tick_idle(struct rq *rq, struct task_struct *curr, int queued)
+static void task_tick_idle(struct rq *rq, struct task_struct *curr, int hrtick)
{
update_curr_idle(rq);
}
diff --git a/kernel/sched/rt.c b/kernel/sched/rt.c
index 1535046..adcf5f0 100644
--- a/kernel/sched/rt.c
+++ b/kernel/sched/rt.c
@@ -2541,7 +2541,7 @@ static inline void watchdog(struct rq *rq, struct task_struct *p) { }
* and everything must be accessed through the @rq and @curr passed in
* parameters.
*/
-static void task_tick_rt(struct rq *rq, struct task_struct *p, int queued)
+static void task_tick_rt(struct rq *rq, struct task_struct *p, int hrtick)
{
struct sched_rt_entity *rt_se = &p->rt;
diff --git a/kernel/sched/sched.h b/kernel/sched/sched.h
index 92134ce..cf5dba1 100644
--- a/kernel/sched/sched.h
+++ b/kernel/sched/sched.h
@@ -2786,7 +2786,7 @@ struct sched_class {
* sched_tick: rq->lock
* sched_tick_remote: rq->lock
*/
- void (*task_tick)(struct rq *rq, struct task_struct *p, int queued);
+ void (*task_tick)(struct rq *rq, struct task_struct *p, int hrtick);
/*
* sched_cgroup_fork: p->pi_lock
*/