[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <v22vajeyu2cj43euhuomfng27o5c6pvxcohijqmoefovbo6hx3@5yursykhzmxk>
Date: Fri, 14 Nov 2025 18:56:24 +0100
From: Michal Koutný <mkoutny@...e.com>
To: Qi Zheng <qi.zheng@...ux.dev>, muchun.song@...ux.dev
Cc: hannes@...xchg.org, hughd@...gle.com, mhocko@...e.com,
roman.gushchin@...ux.dev, shakeel.butt@...ux.dev, david@...hat.com,
lorenzo.stoakes@...cle.com, ziy@...dia.com, harry.yoo@...cle.com, imran.f.khan@...cle.com,
kamalesh.babulal@...cle.com, axelrasmussen@...gle.com, yuanchu@...gle.com, weixugc@...gle.com,
akpm@...ux-foundation.org, linux-mm@...ck.org, linux-kernel@...r.kernel.org,
cgroups@...r.kernel.org, Muchun Song <songmuchun@...edance.com>,
Qi Zheng <zhengqi.arch@...edance.com>
Subject: Re: [PATCH v1 25/26] mm: memcontrol: eliminate the problem of dying
memory cgroup for LRU folios
On Tue, Oct 28, 2025 at 09:58:38PM +0800, Qi Zheng <qi.zheng@...ux.dev> wrote:
> From: Muchun Song <songmuchun@...edance.com>
>
> Pagecache pages are charged at allocation time and hold a reference
> to the original memory cgroup until reclaimed. Depending on memory
> pressure, page sharing patterns between different cgroups and cgroup
> creation/destruction rates, many dying memory cgroups can be pinned
> by pagecache pages, reducing page reclaim efficiency and wasting
> memory. Converting LRU folios and most other raw memory cgroup pins
> to the object cgroup direction can fix this long-living problem.
>
> Finally, folio->memcg_data of LRU folios and kmem folios will always
> point to an object cgroup pointer. The folio->memcg_data of slab
> folios will point to an vector of object cgroups.
>
> Signed-off-by: Muchun Song <songmuchun@...edance.com>
> Signed-off-by: Qi Zheng <zhengqi.arch@...edance.com>
> ---
> include/linux/memcontrol.h | 77 +++++----------
> mm/memcontrol-v1.c | 15 +--
> mm/memcontrol.c | 189 +++++++++++++++++++++++--------------
> 3 files changed, 150 insertions(+), 131 deletions(-)
(I know it's not only this patch but all the preceding ones, still)
thanks!
Michal
Download attachment "signature.asc" of type "application/pgp-signature" (266 bytes)
Powered by blists - more mailing lists