controllers/memcg: document non-hierarchical on v5.11
PATCH 1/1 controllers/memcg: document non-hierarchical on v5.11
Since kernel v5.11, there is no non-hierarchical mode, so mention it in the code.
Signed-off-by Krzysztof Kozlowski <[email protected]>
--- .../kernel/controllers/memcg/functional/memcg_lib.sh | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-)
testcases/kernel/controllers/memcg/functional/memcg_lib.sh +8 -4
@@ -124,13 +124,17 @@ memcg_setup() ROD mkdir /dev/memcg ROD mount -t cgroup -omemory memcg /dev/memcg - # The default value for memory.use_hierarchy is 0 and some of tests - # (memcg_stat_test.sh and memcg_use_hierarchy_test.sh) expect it so - # while there are distributions (RHEL7U0Beta for example) that sets - # it to 1. + # For kernels older than v5.11 the default value for + # memory.use_hierarchy is 0 and some of tests (memcg_stat_test.sh and + # memcg_use_hierarchy_test.sh) expect it so while there are + # distributions (RHEL7U0Beta for example) that sets it to 1. # Note: If there are already subgroups created it is not possible, # to set this back to 0. # This seems to be the default for all systems using systemd. + # + # Starting with kernel v5.11, the non-hierarchical mode is not + # available. See Linux kernel commit bef8620cd8e0 ("mm: memcg: + # deprecate the non-hierarchical mode"). orig_memory_use_hierarchy=$(cat /dev/memcg/memory.use_hierarchy) if [ -z "$orig_memory_use_hierarchy" ];then tst_res TINFO "cat /dev/memcg/ failed"
Signature · 1 line
2.27.0
PATCH 1/1 controllers/memcg: document non-hierarchical on v5.11
Quoted 8 lines · Krzysztof Kozlowski
Since kernel v5.11, there is no non-hierarchical mode, so mention it in the code.
Signed-off-by Krzysztof Kozlowski <[email protected]>--- .../kernel/controllers/memcg/functional/memcg_lib.sh | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-)
Any comments here?
Best regards,
Krzysztof
PATCH 1/1 controllers/memcg: document non-hierarchical on v5.11
Hi Krzysztof,
Quoted 11 lines · Krzysztof Kozlowski
Quoted 7 lines
Since kernel v5.11, there is no non-hierarchical mode, so mention it in the code.
Signed-off-by Krzysztof Kozlowski <[email protected]>--- .../kernel/controllers/memcg/functional/memcg_lib.sh | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-)Any comments here?
Good point, sorry for overlooking this. Thanks, merged!
Kind regards,
Petr
Quoted 2 lines
Best regards,
Krzysztof