summaryrefslogtreecommitdiff
path: root/rust/helpers/atomic.c
diff options
context:
space:
mode:
authorChen Ridong <chenridong@huawei.com>2025-09-17 06:04:47 +0000
committerTejun Heo <tj@kernel.org>2025-09-17 08:37:30 -1000
commit86bbbd1f33ab31a20f6cacf88660333d25ef5fa4 (patch)
treeff4b98f35be77c9149fe8a32cb9567a66236d52c /rust/helpers/atomic.c
parent6a59fc4a3a5b19ea375b54ea70d16713c45ea5a0 (diff)
cpuset: Refactor exclusive CPU mask computation logic
The current compute_effective_exclusive_cpumask function handles multiple scenarios with different input parameters, making the code difficult to follow. This patch refactors it into two separate functions: compute_excpus and compute_trialcs_excpus. The compute_excpus function calculates the exclusive CPU mask for a given input and excludes exclusive CPUs from sibling cpusets when cs's exclusive_cpus is not explicitly set. The compute_trialcs_excpus function specifically handles exclusive CPU computation for trial cpusets used during CPU mask configuration updates, and always excludes exclusive CPUs from sibling cpusets. This refactoring significantly improves code readability and clarity, making it explicit which function to call for each use case and what parameters should be provided. 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 'rust/helpers/atomic.c')
0 files changed, 0 insertions, 0 deletions