[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20201029153921.GC9928@blackbook>
Date: Thu, 29 Oct 2020 16:39:21 +0100
From: Michal Koutný <mkoutny@...e.com>
To: Roman Gushchin <guro@...com>
Cc: Andrew Morton <akpm@...ux-foundation.org>,
Shakeel Butt <shakeelb@...gle.com>,
Johannes Weiner <hannes@...xchg.org>,
Michal Hocko <mhocko@...nel.org>, linux-kernel@...r.kernel.org,
linux-mm@...ck.org, kernel-team@...com, ltp@...ts.linux.it,
Richard Palethorpe <rpalethorpe@...e.com>,
stable@...r.kernel.org
Subject: Re: [PATCH v2] mm: memcg: link page counters to root if
use_hierarchy is false
Hi.
On Mon, Oct 26, 2020 at 04:13:26PM -0700, Roman Gushchin <guro@...com> wrote:
> Please note, that in the non-hierarchical mode all objcgs are always
> reparented to the root memory cgroup, even if the hierarchy has more
> than 1 level. This patch doesn't change it.
>
> The patch also doesn't affect how the hierarchical mode is working,
> which is the only sane and truly supported mode now.
I agree with the patch and you can add
Reviewed-by: Michal Koutný <mkoutny@...e.com>
However, it effectively switches any users of root.use_hierarchy=0 (if there
are any, watching the counters of root memcg) into root.use_hierarchy=1.
So I'd show them the warning even with a single level of cgroups, i.e.
add this hunk
@@ -5356,12 +5356,11 @@
page_counter_init(&memcg->kmem, &root_mem_cgroup->kmem);
page_counter_init(&memcg->tcpmem, &root_mem_cgroup->tcpmem);
/*
- * Deeper hierachy with use_hierarchy == false doesn't make
+ * Hierachy with use_hierarchy == false doesn't make
* much sense so let cgroup subsystem know about this
* unfortunate state in our controller.
*/
- if (parent != root_mem_cgroup)
- memory_cgrp_subsys.broken_hierarchy = true;
+ memory_cgrp_subsys.broken_hierarchy = true;
}
/* The following stuff does not apply to the root */
What do you think?
Michal
Download attachment "signature.asc" of type "application/pgp-signature" (834 bytes)
Powered by blists - more mailing lists