On 8/23/26 10:01 PM, Guopeng Zhang wrote:
From: Guopeng Zhang <[email protected]>

check_isolcpus() clears ISOLCPUS before rebuilding it from sched domain
data. Comparing that empty value with
/sys/devices/system/cpu/isolated makes the test fail whenever
isolcpus=domain is present.

That sysfs file is generated from HK_TYPE_DOMAIN_BOOT and does not change
when cpuset updates HK_TYPE_DOMAIN. Re-reading it cannot validate dynamic
housekeeping updates. The cpuset.cpus.isolated and sched domain checks
already cover the two dynamic interfaces, so remove the invalid comparison.

This can be reproduced on a kernel booted with isolcpus=domain,15:

     # tools/testing/selftests/cgroup/test_cpuset_prs.sh

The test fails its first state-matrix isolation check before the change and
continues past that check afterward.

Fixes: 6df415aa46ec ("cgroup/cpuset: Defer housekeeping_update() calls from CPU 
hotplug to workqueue")
Signed-off-by: Guopeng Zhang <[email protected]>
---
  tools/testing/selftests/cgroup/test_cpuset_prs.sh | 6 ------
  1 file changed, 6 deletions(-)

diff --git a/tools/testing/selftests/cgroup/test_cpuset_prs.sh 
b/tools/testing/selftests/cgroup/test_cpuset_prs.sh
index da8f7b920178..fdb3185570d4 100755
--- a/tools/testing/selftests/cgroup/test_cpuset_prs.sh
+++ b/tools/testing/selftests/cgroup/test_cpuset_prs.sh
@@ -797,7 +797,6 @@ check_isolcpus()
        EXPECTED_ISOLCPUS=$1
        ISCPUS=${CGROUP2}/cpuset.cpus.isolated
        ISOLCPUS=$(cat $ISCPUS)
-       HKICPUS=$(cat /sys/devices/system/cpu/isolated)
        LASTISOLCPU=
        SCHED_DOMAINS=/sys/kernel/debug/sched/domains
        if [[ $EXPECTED_ISOLCPUS = . ]]
@@ -835,11 +834,6 @@ check_isolcpus()
        ISOLCPUS=
        EXPECTED_ISOLCPUS=$EXPECTED_SDOMAIN
- #
-       # The inverse of HK_TYPE_DOMAIN cpumask in $HKICPUS should match 
$ISOLCPUS
-       #
-       [[ "$ISOLCPUS" != "$HKICPUS" ]] && return 1
-
        #
        # Use the sched domain in debugfs to check isolated CPUs, if available
        #

The /sys/devices/system/cpu/isolated had recently be changed to report the boot time isolcpus=domain value. So the check is no longer valid and should be removed. Of course the position of the check is also problematic. So it should be removed.

Reviewed-by: Waiman Long <[email protected]>


Reply via email to