Re: [RFC PATCH v3 06/24] sched/rt: Introduce HCBS specific structs in task_group
From: Juri Lelli
Date: Thu Oct 02 2025 - 11:58:27 EST
Hello,
On 29/09/25 11:22, Yuri Andriaccio wrote:
> From: luca abeni <luca.abeni@xxxxxxxxxxxxxxx>
>
> Each task_group manages a number of new objects:
> - a sched_dl_entity/dl_server for each CPU
> - a dl_bandwidth object to keep track of its allocated dl_bandwidth
>
> Co-developed-by: Alessio Balsini <a.balsini@xxxxxxxx>
> Signed-off-by: Alessio Balsini <a.balsini@xxxxxxxx>
> Co-developed-by: Andrea Parri <parri.andrea@xxxxxxxxx>
> Signed-off-by: Andrea Parri <parri.andrea@xxxxxxxxx>
> Co-developed-by: Yuri Andriaccio <yurand2000@xxxxxxxxx>
> Signed-off-by: Yuri Andriaccio <yurand2000@xxxxxxxxx>
> Signed-off-by: luca abeni <luca.abeni@xxxxxxxxxxxxxxx>
> ---
...
> @@ -467,10 +474,17 @@ struct task_group {
> #endif /* CONFIG_FAIR_GROUP_SCHED */
>
> #ifdef CONFIG_RT_GROUP_SCHED
> + /*
> + * Each task group manages a different scheduling entity per CPU, i.e. a
> + * different deadline server, and a runqueue per CPU. All the dl-servers
> + * share the same dl_bandwidth object.
> + */
> struct sched_rt_entity **rt_se;
> + struct sched_dl_entity **dl_se;
> struct rt_rq **rt_rq;
>
> struct rt_bandwidth rt_bandwidth;
> + struct dl_bandwidth dl_bandwidth;
> #endif
>
> struct scx_task_group scx;
> @@ -817,12 +831,12 @@ struct rt_rq {
> raw_spinlock_t rt_runtime_lock;
>
> unsigned int rt_nr_boosted;
> -
> - struct rq *rq; /* this is always top-level rq, cache? */
> #endif
> #ifdef CONFIG_CGROUP_SCHED
> struct task_group *tg; /* this tg has "this" rt_rq on given CPU for runnable entities */
> #endif
> +
> + struct rq *rq; /* cgroup's runqueue if the rt_rq entity belongs to a cgroup, otherwise top-level rq */
The comment really wants to span multiple lines, maybe above the
pointer.
Thanks,
Juri