diff options
| author | T.J. Mercier <[email protected]> | 2025-04-16 21:17:51 +0000 |
|---|---|---|
| committer | Tejun Heo <[email protected]> | 2025-04-17 17:32:53 +0000 |
| commit | 1bf67c8fdbda21fadd564a12dbe2b13c1ea5eda7 (patch) | |
| tree | c6330b821595282ac8136728dab2f3f7dee5969c /tools/testing/selftests/net/lib/py/ynl.py | |
| parent | cgroup: Fix compilation issue due to cgroup_mutex not being exported (diff) | |
| download | kernel-1bf67c8fdbda21fadd564a12dbe2b13c1ea5eda7.tar.gz kernel-1bf67c8fdbda21fadd564a12dbe2b13c1ea5eda7.zip | |
cgroup/cpuset-v1: Add missing support for cpuset_v2_mode
Android has mounted the v1 cpuset controller using filesystem type
"cpuset" (not "cgroup") since 2015 [1], and depends on the resulting
behavior where the controller name is not added as a prefix for cgroupfs
files. [2]
Later, a problem was discovered where cpu hotplug onlining did not
affect the cpuset/cpus files, which Android carried an out-of-tree patch
to address for a while. An attempt was made to upstream this patch, but
the recommendation was to use the "cpuset_v2_mode" mount option
instead. [3]
An effort was made to do so, but this fails with "cgroup: Unknown
parameter 'cpuset_v2_mode'" because commit e1cba4b85daa ("cgroup: Add
mount flag to enable cpuset to use v2 behavior in v1 cgroup") did not
update the special cased cpuset_mount(), and only the cgroup (v1)
filesystem type was updated.
Add parameter parsing to the cpuset filesystem type so that
cpuset_v2_mode works like the cgroup filesystem type:
$ mkdir /dev/cpuset
$ mount -t cpuset -ocpuset_v2_mode none /dev/cpuset
$ mount|grep cpuset
none on /dev/cpuset type cgroup (rw,relatime,cpuset,noprefix,cpuset_v2_mode,release_agent=/sbin/cpuset_release_agent)
[1] https://cs.android.com/android/_/android/platform/system/core/+/b769c8d24fd7be96f8968aa4c80b669525b930d3
[2] https://cs.android.com/android/platform/superproject/main/+/main:system/core/libprocessgroup/setup/cgroup_map_write.cpp;drc=2dac5d89a0f024a2d0cc46a80ba4ee13472f1681;l=192
[3] https://lore.kernel.org/lkml/[email protected]/T/
Fixes: e1cba4b85daa ("cgroup: Add mount flag to enable cpuset to use v2 behavior in v1 cgroup")
Signed-off-by: T.J. Mercier <[email protected]>
Acked-by: Waiman Long <[email protected]>
Reviewed-by: Kamalesh Babulal <[email protected]>
Acked-by: Michal Koutný <[email protected]>
Signed-off-by: Tejun Heo <[email protected]>
Diffstat (limited to 'tools/testing/selftests/net/lib/py/ynl.py')
0 files changed, 0 insertions, 0 deletions
