]> www.infradead.org Git - users/jedix/linux-maple.git/commit
cgroup/cpuset: Disable cpuset_cpumask_can_shrink() test if not load balancing
authorWaiman Long <longman@redhat.com>
Thu, 14 Nov 2024 18:19:15 +0000 (13:19 -0500)
committerTejun Heo <tj@kernel.org>
Thu, 14 Nov 2024 18:44:03 +0000 (08:44 -1000)
commitfbfbf86685b3270dc27d1c5d6108532334aaf329
tree758929a505dee6300f7a335fec49fa6530ef87b3
parentc4c9cebe2fb9cdc73e55513de7af7a4f50260e88
cgroup/cpuset: Disable cpuset_cpumask_can_shrink() test if not load balancing

With some recent proposed changes [1] in the deadline server code,
it has caused a test failure in test_cpuset_prs.sh when a change
is being made to an isolated partition. This is due to failing
the cpuset_cpumask_can_shrink() check for SCHED_DEADLINE tasks at
validate_change().

This is actually a false positive as the failed test case involves an
isolated partition with load balancing disabled. The deadline check
is not meaningful in this case and the users should know what they
are doing.

Fix this by doing the cpuset_cpumask_can_shrink() check only when loading
balanced is enabled. Also change its arguments to use effective_cpus
for the current cpuset and user_xcpus() as an approiximation for the
target effective_cpus as the real effective_cpus hasn't been fully
computed yet as this early stage.

As the check isn't comprehensive, there may be false positives or
negatives. We may have to revise the code to do a more thorough check
in the future if this becomes a concern.

[1] https://lore.kernel.org/lkml/82be06c1-6d6d-4651-86c9-bcc828cbcb80@redhat.com/T/#t

Signed-off-by: Waiman Long <longman@redhat.com>
Signed-off-by: Tejun Heo <tj@kernel.org>
kernel/cgroup/cpuset.c