Lines Matching full:cpus
25 SUBPARTS_CPUS=$CGROUP2/.__DEBUG__.cpuset.cpus.subpartitions
26 CPULIST=$(cat $CGROUP2/cpuset.cpus.effective)
29 [[ $NR_CPUS -lt 8 ]] && skip_test "Test needs at least 8 cpus available!"
79 echo 0-6 > test/cpuset.cpus
80 echo root > test/cpuset.cpus.partition
81 cat test/cpuset.cpus.partition | grep -q invalid
83 echo member > test/cpuset.cpus.partition
84 echo "" > test/cpuset.cpus
88 # If isolated CPUs have been reserved at boot time (as shown in
89 # cpuset.cpus.isolated), these isolated CPUs should be outside of CPUs 0-7
91 # the tests may fail incorrectly. These isolated CPUs will also be removed
94 BOOT_ISOLCPUS=$(cat $CGROUP2/cpuset.cpus.isolated)
98 skip_test "Pre-isolated CPUs ($BOOT_ISOLCPUS) overlap CPUs to be tested"
99 echo "Pre-isolated CPUs: $BOOT_ISOLCPUS"
136 echo $EXPECTED_VAL > cpuset.cpus.partition
138 ACTUAL_VAL=$(cat cpuset.cpus.partition)
140 echo "cpuset.cpus.partition: expect $EXPECTED_VAL, found $ACTUAL_VAL"
149 ACTUAL_VAL=$(cat cpuset.cpus.effective)
151 echo "cpuset.cpus.effective: expect '$EXPECTED_VAL', found '$ACTUAL_VAL'"
179 # P<v> = set cpus.partition (0:member, 1:root, 2:isolated)
180 # C<l> = add cpu-list to cpuset.cpus
181 # X<l> = add cpu-list to cpuset.cpus.exclusive
186 # ECPUs - effective CPUs of cpusets
188 # ISOLCPUS - isolated CPUs (<icpus>[,<icpus2>])
191 # sched-debug matching which includes offline CPUs and single-CPU partitions
192 # while the second one is for matching cpuset.cpus.isolated.
247 # Remote partition and cpuset.cpus.exclusive tests
292 # cpus.exclusive.effective clearing test
338 # Incorrect change to cpuset.cpus[.exclusive] invalidates partition root
340 # Adding CPUs to partition root that are not in parent's
341 # cpuset.cpus is allowed, but those extra CPUs are ignored.
344 # Taking away all CPUs from parent or itself if there are tasks
355 # cpuset.cpus can contains cpus not in parent's cpuset.cpus as long
359 # Deletion of CPUs distributed to child cgroup is allowed.
362 # To become a valid partition root, cpuset.cpus must overlap parent's
363 # cpuset.cpus.
374 # A non-exclusive cpuset.cpus change will invalidate partition and its siblings
379 # cpuset.cpus can overlap with sibling cpuset.cpus.exclusive but not subsumed by it
382 # Child partition root that try to take all CPUs from parent partition
388 # Clearing of cpuset.cpus with a preset cpuset.cpus.exclusive shouldn't
389 # affect cpuset.cpus.exclusive.effective.
399 # Changes to cpuset.cpus.exclusive that violate exclusivity rule is rejected
402 # cpuset.cpus cannot be a subset of sibling cpuset.cpus.exclusive
453 PFILE=$CGRP/cpuset.cpus.partition
454 CFILE=$CGRP/cpuset.cpus
455 XFILE=$CGRP/cpuset.cpus.exclusive
464 CPUS=${CMD#?}
465 COMM="echo $CPUS > $XFILE"
469 CPUS=${CMD#?}
470 COMM="echo $CPUS > $CFILE"
535 # Return 1 if the list of effective cpus isn't the same as the initial list.
551 CPUS=$DIR/cpuset.cpus
552 ECPUS=$DIR/cpuset.cpus.effective
553 XCPUS=$DIR/cpuset.cpus.exclusive
554 XECPUS=$DIR/cpuset.cpus.exclusive.effective
555 PRS=$DIR/cpuset.cpus.partition
556 PCPUS=$DIR/.__DEBUG__.cpuset.cpus.subpartitions
557 ISCPUS=$DIR/cpuset.cpus.isolated
558 [[ -e $CPUS ]] && echo "$CPUS: $(cat $CPUS)"
569 # Check effective cpus
579 CPUS=$2
583 FILE=cpuset.cpus.exclusive.effective
585 FILE=cpuset.cpus.effective
590 [[ $CPUS = $(cat $CGRP/$FILE) ]] || return 1
613 P*) FILE=$CGRP_DIR/cpuset.cpus.partition
643 DOMS=$(cat $CGRP_DIR/cpuset.cpus.effective)
652 # Get isolated (including offline) CPUs by looking at
653 # /sys/kernel/debug/sched/domains and cpuset.cpus.isolated control file,
656 # Note that isolated CPUs from the sched/domains context include offline
657 # CPUs as well as CPUs in non-isolated 1-CPU partition. Those CPUs may
658 # not be included in the cpuset.cpus.isolated control file which contains
659 # only CPUs in isolated partitions as well as those that are isolated at
664 # <isolcpus2> - cpuset.cpus.isolated value = <isolcpus1> if not defined
672 ISCPUS=${CGROUP2}/cpuset.cpus.isolated
687 # Check cpuset.cpus.isolated cpumask
704 # Use the sched domain in debugfs to check isolated CPUs, if available
754 # Check to see if there are unexpected isolated CPUs left beyond the boot
769 echo "Unexpected isolated CPUs: $ISOLCPUS"
835 # Compare the expected isolated CPUs with the actual ones,
846 NEWLIST=$(cat cpuset.cpus.effective)
853 NEWLIST=$(cat cpuset.cpus.effective)
856 echo "Effective cpus changed to $NEWLIST after test $I!"
872 echo 2-3 > cpuset.cpus
873 TYPE=$(cat cpuset.cpus.partition)
874 [[ $TYPE = member ]] || echo member > cpuset.cpus.partition
897 console_msg "Distribute all cpus to child partition"
903 echo 2-3 > cpuset.cpus
917 echo 2 > cpuset.cpus
921 echo 2-3 > cpuset.cpus
961 echo 1 > cpuset.cpus
963 echo root > cpuset.cpus.partition
966 wait_inotify $PWD/cpuset.cpus.partition $PRS &
987 echo member > cpuset.cpus.partition