]> www.infradead.org Git - users/jedix/linux-maple.git/commit
cgroup: selftests: Add API to find root of specific controller
authorSean Christopherson <seanjc@google.com>
Thu, 8 May 2025 18:46:46 +0000 (18:46 +0000)
committerSean Christopherson <seanjc@google.com>
Fri, 16 May 2025 18:45:15 +0000 (11:45 -0700)
commit38e1dd578142bd3ed4f43e3657562c1e6af597e7
tree0639702e784e1170fb2733d776693c76f48d63f3
parent2c754a84ff16ae835cea470c4146fabe94fa129f
cgroup: selftests: Add API to find root of specific controller

Add an API in the cgroups library to find the root of a specific
controller.  KVM selftests will use the API to find the memory controller.

Search for the controller on both v1 and v2 mounts, as KVM selftests'
usage will be completely oblivious of v1 versus v2.

Signed-off-by: James Houghton <jthoughton@google.com>
Link: https://lore.kernel.org/r/20250508184649.2576210-6-jthoughton@google.com
Signed-off-by: Sean Christopherson <seanjc@google.com>
tools/testing/selftests/cgroup/lib/cgroup_util.c
tools/testing/selftests/cgroup/lib/include/cgroup_util.h