[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <23f6bad90dd7eb98a7fef00736b4aff21bbcad4d@linux.dev>
Date: Wed, 24 Dec 2025 14:51:12 +0000
From: "Yosry Ahmed" <yosry.ahmed@...ux.dev>
To: "Harry Yoo" <harry.yoo@...cle.com>
Cc: "Qi Zheng" <qi.zheng@...ux.dev>, hannes@...xchg.org, hughd@...gle.com,
mhocko@...e.com, roman.gushchin@...ux.dev, shakeel.butt@...ux.dev,
muchun.song@...ux.dev, david@...nel.org, lorenzo.stoakes@...cle.com,
ziy@...dia.com, imran.f.khan@...cle.com, kamalesh.babulal@...cle.com,
axelrasmussen@...gle.com, yuanchu@...gle.com, weixugc@...gle.com,
chenridong@...weicloud.com, mkoutny@...e.com, akpm@...ux-foundation.org,
hamzamahfooz@...ux.microsoft.com, apais@...ux.microsoft.com,
lance.yang@...ux.dev, linux-mm@...ck.org, linux-kernel@...r.kernel.org,
cgroups@...r.kernel.org, "Qi Zheng" <zhengqi.arch@...edance.com>
Subject: Re: [PATCH v2 00/28] Eliminate Dying Memory Cgroup
December 24, 2025 at 12:43 AM, "Harry Yoo" <harry.yoo@...cle.com> wrote:
>
> On Tue, Dec 23, 2025 at 08:04:50PM +0000, Yosry Ahmed wrote:
>
> >
> > I think there might be a problem with non-hierarchical stats on cgroup
> > v1, I brought it up previously [*]. I am not sure if this was addressed
> > but I couldn't immediately find anything.
> >
> Hi, Yosry. Thanks for bringing this up!
>
> >
> > In short, if memory is charged to a dying cgroup at the time of
> > reparenting, when the memory gets uncharged the stats updates will occur
> > at the parent. This will update both hierarchical and non-hierarchical
> > stats of the parent, which would corrupt the parent's non-hierarchical
> > stats (because those counters were never incremented when the memory was
> > charged).
> >
> Hmm, I wonder if this only applies to LRU pages.
>
> In theory we should have this problem for NR_SLAB{UN,}RECLAIMABLE_B
> because we already reparent objcgs, or am I missing something?
We do, but we don't expose these stats in cgroup v1, and we don't expose non-hierarchical stats in cgroup v2.
Powered by blists - more mailing lists