[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250502001742.3087558-1-shakeel.butt@linux.dev>
Date: Thu, 1 May 2025 17:17:39 -0700
From: Shakeel Butt <shakeel.butt@...ux.dev>
To: Andrew Morton <akpm@...ux-foundation.org>
Cc: Johannes Weiner <hannes@...xchg.org>,
Michal Hocko <mhocko@...nel.org>,
Roman Gushchin <roman.gushchin@...ux.dev>,
Muchun Song <muchun.song@...ux.dev>,
Alexei Starovoitov <ast@...nel.org>,
linux-mm@...ck.org,
cgroups@...r.kernel.org,
bpf@...r.kernel.org,
linux-kernel@...r.kernel.org,
Meta kernel team <kernel-team@...a.com>
Subject: [PATCH v2 0/3] memcg: decouple memcg and objcg stocks
The per-cpu memcg charge cache and objcg charge cache are coupled in a
single struct memcg_stock_pcp and a single local lock is used to protect
both of the caches. This makes memcg charging and objcg charging nmi
safe challenging. Decoupling memcg and objcg stocks would allow us to
make them nmi safe and even work without disabling irqs independently.
This series completely decouples memcg and objcg stocks.
Changes since v1:
- Drop first patch as requested by Alexei.
- Remove preempt_disable() usage as suggested by Vlastimil.
Shakeel Butt (3):
memcg: separate local_trylock for memcg and obj
memcg: completely decouple memcg and obj stocks
memcg: no irq disable for memcg stock lock
mm/memcontrol.c | 159 +++++++++++++++++++++++++++++-------------------
1 file changed, 97 insertions(+), 62 deletions(-)
--
2.47.1
Powered by blists - more mailing lists