[LTP] [PATCH v9 1/1] cpuset_memory_spread: rewrite as a C test using the LTP cgroup library
Changwei Zou
changwei.zou@canonical.com
Thu Nov 12 11:00:31 CET 2026
Hi Petr,
Thanks for the review.
> +#else
> +TST_TEST_TCONF("test requires libnuma >= 2");
> IMHO at least this suggestion by agent in v7 was wrong. You should have kept
> using:
> TST_TEST_TCONF(NUMA_ERROR_MSG);
Agreed, that was a mistake on my side. I've restored
TST_TEST_TCONF(NUMA_ERROR_MSG);
in v10.
While at it I also dropped ".needs_cgroup_ver = TST_CG_V1". The
SAFE_CG_HAS() check on cpuset.memory_spread_page in setup() already skips
the test with TCONF when cpuset is mounted on the unified (v2) hierarchy,
so forcing the controller version is redundant.
> BTW on which Ubuntu version do you test which still uses v1 and have
> libnuma2?
I tested on an AWS instance running Ubuntu with the 6.8.0-1069-aws kernel
(2 NUMA memory nodes, 96 CPUs, libnuma present).
To be precise, the system does not use cgroup v1 by default -- /sys/fs/cgroup
is cgroup v2 (cgroup2fs). However, systemd does not use the cpuset
controller on the v2 hierarchy there, so cpuset is idle and the LTP cgroup
library is able to mount a v1 cpuset hierarchy on the fly:
tst_cgroup.c:793: TINFO: Mounted V1 cpuset CGroup on /tmp/cgroup_cpuset
cpuset.memory_spread_page then exists in that v1 cpuset and the test runs;
all six subtests pass. On a host where cpuset is actively bound to the v2
hierarchy the test simply skips with TCONF, which is the expected behaviour
since cpuset.memory_spread_page is a cgroup v1 only knob.
I'll submit v10 with these changes later.
Thanks,
Changwei
More information about the ltp
mailing list