This is an update of a previous series[1] addressing Johannes' comments, and rebasing on top of linus's master. Unfortunately, linus's master doesn't seem to be bootable at the moment, so I haven't re-run the tests on this change yet. I'll see about re-running everything in the morning. (root= resolution seems to be failing both for x86-64 (in qemu) and usermode linux) Documentation/admin-guide/cgroup-v2.rst | 26 ++-- include/linux/cgroup-defs.h | 5 + include/linux/cgroup.h | 3 + include/linux/memcontrol.h | 5 + include/linux/page_counter.h | 6 +- kernel/cgroup/cgroup-internal.h | 2 + kernel/cgroup/cgroup.c | 7 ++ mm/memcontrol.c | 117 ++++++++++++++++-- mm/page_counter.c | 30 +++-- tools/testing/selftests/cgroup/cgroup_util.c | 22 ++++ tools/testing/selftests/cgroup/cgroup_util.h | 2 + tools/testing/selftests/cgroup/test_memcontrol.c | 226 ++++++++++++++++++++++++++++++++-- 12 files changed, 416 insertions(+), 35 deletions(-) [1]: https://lore.kernel.org/cgroups/20240722235554.2911971-1-davidf@xxxxxxxxx/T/ Thanks for all the constructive comments and discussion! David Finkel Senior Principal Engineer, Core Services Vimeo Inc.