lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <7zijk3p3uw6esihry6d3qqrsahhnxnvvw6aqb56ocgujrj7qwc@f7bileo5sl6x>
Date: Fri, 26 Jul 2024 10:18:31 -0700
From: Shakeel Butt <shakeel.butt@...ux.dev>
To: "T.J. Mercier" <tjmercier@...gle.com>
Cc: Yosry Ahmed <yosryahmed@...gle.com>, 
	Andrew Morton <akpm@...ux-foundation.org>, Johannes Weiner <hannes@...xchg.org>, 
	Michal Hocko <mhocko@...nel.org>, Roman Gushchin <roman.gushchin@...ux.dev>, 
	Muchun Song <muchun.song@...ux.dev>, Greg Thelen <gthelen@...gle.com>, 
	Facebook Kernel Team <kernel-team@...a.com>, linux-mm@...ck.org, linux-kernel@...r.kernel.org
Subject: Re: [RFC PATCH] memcg: expose children memory usage for root

On Fri, Jul 26, 2024 at 09:50:49AM GMT, T.J. Mercier wrote:
> On Fri, Jul 26, 2024 at 9:26 AM Yosry Ahmed <yosryahmed@...gle.com> wrote:
> >
[...]
> >
> > Oh yeah we already charge the root's page counters hierarchically in
> > the upstream kernel, we just do not charge them if the origin of the
> > charge is the root itself.
> >
> > We also have workloads that iterate top-level memcgs to calculate the
> > total charged memory, so memory.children_usage for the root memcg
> > would help.
> >
> > As for memory.current, do you have any data about how much memory is
> > charged to the root itself?
> 
> Yeah I wonder if we'd be able to see any significant regressions for
> stuff that lives there today if we were to start charging it. I can
> try running a test with Android next week. I guess try_charge() is the
> main thing that would need to change to allow root charges?
> 

It would a bit more involved like allocating objcg for the root and
changing memcg_slab_post_alloc_hook() to use root memcg if account flags
are not present. There might some changes needed for list_lru and
reclaim but I have not looked deeper into it yet.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ