[PATCH 0/4] sched_ext: Decompose scx_cid_init()
From: Zhang Qiao
Date: Thu Nov 05 2026 - 01:17:05 EST
scx_cid_init() grew into a ~230-line monolith interleaving table
allocation, the node/LLC/cluster/core topology walk, the no-topo tail
and the shard range finalization. This series decomposes it into stage
helpers sharing a file-private builder struct, in four individually
compilable steps:
01/04 extract the no-topo tail and the table finalization
02/04 collect the construction state in scx_cid_builder
03/04 extract the construction of a single LLC cid range
04/04 extract the online (node-level) walk
No behavior change: WARN checks, error paths, shard policy and
publication timing are all preserved. This is preparation for
follow-up fixes to the partial-SMT core counting in
calc_shard_layout() and the single-core shard hard-cap corner case,
which are deliberately kept out to keep this series a pure code
motion.
Based on tj/sched_ext for-7.5.
Signed-off-by: Zhang Qiao <zhangqiao22@xxxxxxxxxx>
Zhang Qiao (4):
sched_ext: Extract no-topology CID construction and table finalization
sched_ext: Collect CID construction state in a private builder
sched_ext: Extract construction of a single LLC CID range
sched_ext: Extract online CID construction from scx_cid_init
kernel/sched/ext/cid.c | 422 +++++++++++++++++++++++------------------
1 file changed, 241 insertions(+), 181 deletions(-)
base-commit: beb427129cbdd0154cdb017a694779963e46b520
--
2.43.0