Re: [PATCH v2 1/4] sched: Rename/clarify sched_class::task_tick(.queued) argument

From: Vincent Guittot

Date: Tue Oct 13 2026 - 13:22:37 EST


On Tue, 29 Sept 2026 at 10:55, Peter Zijlstra <peterz@xxxxxxxxxxxxx> wrote:
>
> 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>

> ---
> 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(-)
>
> --- a/kernel/sched/deadline.c
> +++ b/kernel/sched/deadline.c
> @@ -2879,7 +2879,7 @@ static void put_prev_task_dl(struct rq *
> * 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,
> * 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);
> }
> --- a/kernel/sched/ext/ext.c
> +++ b/kernel/sched/ext/ext.c
> @@ -3809,7 +3809,7 @@ void scx_tick(struct rq *rq)
> update_other_load_avgs(rq);
> }
>
> -static void task_tick_scx(struct rq *rq, struct task_struct *curr, int queued)
> +static void task_tick_scx(struct rq *rq, struct task_struct *curr, int hrtick)
> {
> struct scx_sched *sch = scx_task_sched(curr);
>
> --- a/kernel/sched/fair.c
> +++ b/kernel/sched/fair.c
> @@ -6772,7 +6772,7 @@ static void put_prev_entity(struct cfs_r
> }
>
> 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'.
> @@ -6787,10 +6787,10 @@ entity_tick(struct cfs_rq *cfs_rq, struc
>
> #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;
> }
> @@ -15309,7 +15309,7 @@ static inline void task_tick_core(struct
> * 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;
>
> @@ -15319,7 +15319,7 @@ static void task_tick_fair(struct rq *rq
>
> 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);
> }
> @@ -15328,7 +15328,7 @@ static void task_tick_fair(struct rq *rq
> reweight_eevdf(cfs_rq, se, weight, se->on_rq);
> }
>
> - if (queued)
> + if (hrtick)
> return;
>
> if (static_branch_unlikely(&sched_numa_balancing))
> --- a/kernel/sched/idle.c
> +++ b/kernel/sched/idle.c
> @@ -538,7 +538,7 @@ dequeue_task_idle(struct rq *rq, struct
> * 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);
> }
> --- a/kernel/sched/rt.c
> +++ b/kernel/sched/rt.c
> @@ -2541,7 +2541,7 @@ static inline void watchdog(struct rq *r
> * 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;
>
> --- a/kernel/sched/sched.h
> +++ b/kernel/sched/sched.h
> @@ -2737,7 +2737,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
> */
>
>