]> git.baikalelectronics.ru Git - kernel.git/commit
mm: hugetlb controller for cgroups v2
authorGiuseppe Scrivano <gscrivan@redhat.com>
Mon, 16 Dec 2019 19:38:31 +0000 (20:38 +0100)
committerTejun Heo <tj@kernel.org>
Mon, 16 Dec 2019 20:41:40 +0000 (12:41 -0800)
commitfa9793c7fc49ae2bf99f4caf4b3eab81446f2a20
tree608f80245f7978cc3d2eeb8fc3be5f2511b6840c
parent3c3152efa7754fde193040fb1ded1c6ee78fb4c9
mm: hugetlb controller for cgroups v2

In the effort of supporting cgroups v2 into Kubernetes, I stumped on
the lack of the hugetlb controller.

When the controller is enabled, it exposes four new files for each
hugetlb size on non-root cgroups:

- hugetlb.<hugepagesize>.current
- hugetlb.<hugepagesize>.max
- hugetlb.<hugepagesize>.events
- hugetlb.<hugepagesize>.events.local

The differences with the legacy hierarchy are in the file names and
using the value "max" instead of "-1" to disable a limit.

The file .limit_in_bytes is renamed to .max.

The file .usage_in_bytes is renamed to .current.

.failcnt is not provided as a single file anymore, but its value can
be read through the new flat-keyed files .events and .events.local,
through the "max" key.

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
Signed-off-by: Tejun Heo <tj@kernel.org>
Documentation/admin-guide/cgroup-v2.rst
include/linux/hugetlb.h
mm/hugetlb_cgroup.c