[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20201104225613.GF1938922@carbon.dhcp.thefacebook.com>
Date: Wed, 4 Nov 2020 14:56:13 -0800
From: Roman Gushchin <guro@...com>
To: Michal Hocko <mhocko@...e.com>
CC: <linux-mm@...ck.org>, Andrew Morton <akpm@...ux-foundation.org>,
Shakeel Butt <shakeelb@...gle.com>,
Johannes Weiner <hannes@...xchg.org>,
Tejun Heo <tj@...nel.org>, <linux-kernel@...r.kernel.org>,
<kernel-team@...com>
Subject: Re: [PATCH rfc 1/3] mm: memcg: deprecate the non-hierarchical mode
On Wed, Nov 04, 2020 at 09:37:46AM +0100, Michal Hocko wrote:
> On Tue 03-11-20 13:27:23, Roman Gushchin wrote:
> > The non-hierarchical cgroup v1 mode is a legacy of early days
> > of the memory controller and doesn't bring any value today.
>
> This is a bold statement ;)
> All that we know today is that we have a warning in place to complain
> loudly when somebody relies on use_hierarchy=0 with a deeper
> hierarchy. For all those years we have seen _zero_ reports that would
> describe a sensible usecase.
> Moreover we (SUSE) have backported this warning into old distribution
> kernels (since 3.0 based kernels) to extend the coverage and didn't hear
> even for users who adopt new kernels only very slowly. The only report
> we have seen so far was a LTP test suite which doesn't really reflect
> any real life usecase.
Good to know, thank you for providing this information. I'm also
not aware of any users of the non-hierarchical mode.
>
> Feel free to reuse the above in the changelog.
>
> > However, it complicates the code and creates many edge cases
> > all over the memory controller code.
> >
> > It's a good time to deprecate it completely.
> >
> > Functionally this patch enabled is by default for all cgroups
> > and forbids switching it off. Nothing changes if cgroup v2 is used:
> > hierarchical mode was enforced from scratch.
> >
> > To protect the ABI memory.use_hierarchy interface is preserved
> > with a limited functionality: reading always returns "1", writing
> > of "1" passes silently, writing of any other value fails with
> > -EINVAL and a warning to dmesg (on the first occasion).
>
> Yes, that makes sense.
>
> > Signed-off-by: Roman Gushchin <guro@...com>
>
> I do not see any problems with the patch or any left overs behind
> (except for the documentation which you handle in the follow up
> patches).
>
> Acked-by: Michal Hocko <mhocko@...e.com>
>
> Thanks and let's see whether some last minute usecase show up.
Thank you!
Roman
Powered by blists - more mailing lists