Re: [PATCH 3/4] sched/core: Introduce sched_set_rq_on/offline() helper

From: Markus Elfring
Date: Tue Jul 16 2024 - 09:24:07 EST


> Introduce sched_set_rq_on/offline() helper, so it can be called
> in normal or error path simply. No functional changed.

Would you like to improve such a change description another bit?



> +++ b/kernel/sched/core.c
> @@ -9604,6 +9604,30 @@ void set_rq_offline(struct rq *rq)

> +static inline void sched_set_rq_online(struct rq *rq, int cpu)
> +{

> + rq_lock_irqsave(rq, &rf);
> + if (rq->rd) {

> + }
> + rq_unlock_irqrestore(rq, &rf);
> +}


Under which circumstances would you become interested to apply a statement
like “guard(rq_lock_irqsave)(rq);”?
https://elixir.bootlin.com/linux/v6.10/source/kernel/sched/sched.h#L1741

Regards,
Markusbsegall@xxxxxxxxxx