summaryrefslogtreecommitdiff
path: root/rust
diff options
context:
space:
mode:
authorZecheng Li <zecheng@google.com>2026-05-22 10:15:49 -0400
committerPeter Zijlstra <peterz@infradead.org>2026-06-02 12:26:11 +0200
commit89e1f67186baca353b68115bb98bd0bfed9f80c8 (patch)
tree664d2fe614f4318a68b6395b79be5e7e5616ec98 /rust
parentdfcfc97b6df0ea8e1b7d3b590022782abbec3389 (diff)
sched/fair: Remove task_group->se pointer array
Now that struct sched_entity is co-located with struct cfs_rq for non-root task groups, the task_group->se pointer array is redundant. The associated sched_entity can be loaded directly from the cfs_rq. This patch performs the access conversion with the helpers: - is_root_task_group(tg): checks if a task group is the root task group. It compares the task group's address with the global root_task_group variable. - tg_se(tg, cpu): retrieves the cfs_rq and returns the address of the co-located se. This function checks if tg is the root task group to ensure behaving the same of previous tg->se[cpu]. Replaces all accesses that use the tg->se[cpu] pointer array with calls to the new tg_se(tg, cpu) accessor. - cfs_rq_se(cfs_rq): simplifies access paths like cfs_rq->tg->se[...] to use the co-located sched_entity. This function also checks if tg is the root task group to ensure same behavior. Since tg_se is not in very hot code paths, and the branch is a register comparison with an immediate value (`&root_task_group`), the performance impact is expected to be negligible. Signed-off-by: Zecheng Li <zecheng@google.com> Signed-off-by: Zecheng Li <zli94@ncsu.edu> Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org> Reviewed-by: K Prateek Nayak <kprateek.nayak@amd.com> Reviewed-by: Josh Don <joshdon@google.com> Link: https://patch.msgid.link/20260522141623.600235-3-zli94@ncsu.edu
Diffstat (limited to 'rust')
0 files changed, 0 insertions, 0 deletions