summaryrefslogtreecommitdiff
path: root/rust/kernel/alloc/allocator
diff options
context:
space:
mode:
authorZhang Qiao <zhangqiao22@huawei.com>2026-11-10 17:10:42 +0800
committerTejun Heo <tj@kernel.org>2026-11-10 09:18:02 -1000
commit3b1ce3e0ccba4aadbf6330a5ed8bda78f0c9353a (patch)
tree698172fa32d36b6bc33ef1e07d642954201a7e81 /rust/kernel/alloc/allocator
parent564405c424f49d70b13debe7fe5b550234ad6b84 (diff)
sched_ext: Fix partial-SMT core counting in calc_shard_layout()
calc_shard_layout() counts the cores of an LLC to spread them evenly across shards. A core is counted when its cpu is the first cpu of topology_sibling_cpumask(), but the cores scx_cid_init() builds are the siblings intersected with @llc_cpus. The sibling mask may contain cpus outside @llc_cpus - siblings which landed in another node or LLC unit, or offlined siblings on archs that keep them in the mask (mips, sparc64). A core whose first sibling is such a cpu is never counted, so cores_per_shard and nr_large come out too small and the shards end up uneven. Count a core at its first sibling in @llc_cpus, matching the cores the build loop constructs. Fixes: e2c841b91bf9 ("sched_ext: Add CID sharding") Signed-off-by: Zhang Qiao <zhangqiao22@huawei.com> Signed-off-by: Tejun Heo <tj@kernel.org>
Diffstat (limited to 'rust/kernel/alloc/allocator')
0 files changed, 0 insertions, 0 deletions