Join GitHub today
GitHub is home to over 36 million developers working together to host and review code, manage projects, and build software together.Sign up
Fix cgroup hugetlb size prefix for kB #2065
The hugetlb cgroup control files (introduced here in 2012:
The behavior in the kernel has not changed since the introduction, and
As seen from the code in "mem_fmt" inside hugetlb_cgroup.c, only "KB",
Here is a real world example of the files inside the
And the corresponding cgroup files:
Signed-off-by: Odin Ugedal firstname.lastname@example.org
Noticed this when tinkering around with kubernetes on a Raspberry PI (1GB ram) running Arch Linux (
Looks like this is a result of a quick copy-paste of the
Since the kernel only use "KB", "MB" and "GB", the most correct would be to only use them (including B, in order to make go-units work). For sizes larger than 1TB that would result in index-out-of-range, so that would also require a update of the
What do you think @mrunalp?
Also, It would be nice having the list exported, so that other users (eg. kubernetes) can import it instead of copying it.