Re: [RFC PATCH v3 02/24] sched/deadline: Distinct between dl_rq and my_q
From: Juri Lelli
Date: Thu Oct 02 2025 - 09:29:55 EST
Hello,
On 29/09/25 11:21, Yuri Andriaccio wrote:
> From: luca abeni <luca.abeni@xxxxxxxxxxxxxxx>
>
> Create two fields for runqueues in sched_dl_entity to make a distinction between
> the global runqueue and the runqueue which the dl_server serves.
>
> Signed-off-by: luca abeni <luca.abeni@xxxxxxxxxxxxxxx>
> Signed-off-by: Yuri Andriaccio <yurand2000@xxxxxxxxx>
The change looks good to me. Maybe we only want to be a little more verbose in
the changelog, e.g. the following?
Split the single rq pointer in sched_dl_entity into two separate
pointers, following the existing pattern used by sched_rt_entity:
- dl_rq: Points to the deadline runqueue where this entity is queued
- my_q: Points to the runqueue that this entity serves (for servers)
This distinction is currently redundant for the fair_server (both
point to the same CPU's structures), but is essential for future
RT cgroup support where deadline servers will be queued on the
global dl_rq while serving tasks from cgroup-specific runqueues.
Update rq_of_dl_se() to use container_of() to recover the rq from
dl_rq, and update fair.c to explicitly use my_q when accessing the
served runqueue.
Thanks,
Juri