diff options
| author | 2025-09-17 06:04:48 +0000 | |
|---|---|---|
| committer | 2025-09-17 08:37:30 -1000 | |
| commit | c5866c9a007deb92717fc0b94ac47b47291748be (patch) | |
| tree | c07d84b210ea288ac1a39476b9927969c064a620 /scripts/basic/git:/ssh:/git@git.zx2c4.com | |
| parent | cpuset: Refactor exclusive CPU mask computation logic (diff) | |
| download | wireguard-linux-c5866c9a007deb92717fc0b94ac47b47291748be.tar.xz wireguard-linux-c5866c9a007deb92717fc0b94ac47b47291748be.zip | |
cpuset: refactor CPU mask buffer parsing logic
The current implementation contains redundant handling for empty mask
inputs, as cpulist_parse() already properly handles these cases. This
refactoring introduces a new helper function parse_cpuset_cpulist() to
consolidate CPU list parsing logic and eliminate special-case checks for
empty inputs.
Additionally, the effective_xcpus computation for trial cpusets has been
simplified. Rather than computing effective_xcpus only when exclusive_cpus
is set or when the cpuset forms a valid partition, we now recalculate it
on every cpuset.cpus update. This approach ensures consistency and allows
removal of redundant effective_xcpus logic in subsequent patches.
The trial cpuset's effective_xcpus calculation follows two distinct cases:
1. For member cpusets: effective_xcpus is determined by the intersection
of cpuset->exclusive_cpus and the parent's effective_xcpus.
2. For non-member cpusets: effective_xcpus is derived from the intersection
of user_xcpus and the parent's effective_xcpus.
Signed-off-by: Chen Ridong <chenridong@huawei.com>
Reviewed-by: Waiman Long <longman@redhat.com>
Signed-off-by: Tejun Heo <tj@kernel.org>
Diffstat (limited to 'scripts/basic/git:/ssh:/git@git.zx2c4.com')
0 files changed, 0 insertions, 0 deletions
