All of lore.kernel.org
 help / color / mirror / Atom feed
* [LTP] [PATCH] controllers/memcg: document non-hierarchical on v5.11
@ 2021-07-13 16:15 Krzysztof Kozlowski
  2021-08-11 10:09 ` Krzysztof Kozlowski
  0 siblings, 1 reply; 3+ messages in thread
From: Krzysztof Kozlowski @ 2021-07-13 16:15 UTC (permalink / raw)
  To: ltp

Since kernel v5.11, there is no non-hierarchical mode, so mention it in
the code.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com>
---
 .../kernel/controllers/memcg/functional/memcg_lib.sh | 12 ++++++++----
 1 file changed, 8 insertions(+), 4 deletions(-)

diff --git a/testcases/kernel/controllers/memcg/functional/memcg_lib.sh b/testcases/kernel/controllers/memcg/functional/memcg_lib.sh
index 3d04c3a60700..873b637c88f9 100755
--- a/testcases/kernel/controllers/memcg/functional/memcg_lib.sh
+++ b/testcases/kernel/controllers/memcg/functional/memcg_lib.sh
@@ -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"
-- 
2.27.0


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [LTP] [PATCH] controllers/memcg: document non-hierarchical on v5.11
  2021-07-13 16:15 [LTP] [PATCH] controllers/memcg: document non-hierarchical on v5.11 Krzysztof Kozlowski
@ 2021-08-11 10:09 ` Krzysztof Kozlowski
  2021-09-02 16:28   ` Petr Vorel
  0 siblings, 1 reply; 3+ messages in thread
From: Krzysztof Kozlowski @ 2021-08-11 10:09 UTC (permalink / raw)
  To: ltp

On 13/07/2021 18:15, Krzysztof Kozlowski wrote:
> Since kernel v5.11, there is no non-hierarchical mode, so mention it in
> the code.
> 
> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com>
> ---
>  .../kernel/controllers/memcg/functional/memcg_lib.sh | 12 ++++++++----
>  1 file changed, 8 insertions(+), 4 deletions(-)
> 

Any comments here?


Best regards,
Krzysztof

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [LTP] [PATCH] controllers/memcg: document non-hierarchical on v5.11
  2021-08-11 10:09 ` Krzysztof Kozlowski
@ 2021-09-02 16:28   ` Petr Vorel
  0 siblings, 0 replies; 3+ messages in thread
From: Petr Vorel @ 2021-09-02 16:28 UTC (permalink / raw)
  To: ltp

Hi Krzysztof,

> On 13/07/2021 18:15, Krzysztof Kozlowski wrote:
> > Since kernel v5.11, there is no non-hierarchical mode, so mention it in
> > the code.

> > Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com>
> > ---
> >  .../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


> Best regards,
> Krzysztof

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2021-09-02 16:28 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-07-13 16:15 [LTP] [PATCH] controllers/memcg: document non-hierarchical on v5.11 Krzysztof Kozlowski
2021-08-11 10:09 ` Krzysztof Kozlowski
2021-09-02 16:28   ` Petr Vorel

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.