linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/4] memcg: decouple memcg and objcg stocks
@ 2025-04-29 23:04 Shakeel Butt
  2025-04-29 23:04 ` [PATCH 1/4] memcg: simplify consume_stock Shakeel Butt
                   ` (3 more replies)
  0 siblings, 4 replies; 12+ messages in thread
From: Shakeel Butt @ 2025-04-29 23:04 UTC (permalink / raw)
  To: Andrew Morton
  Cc: Johannes Weiner, Michal Hocko, Roman Gushchin, Muchun Song,
	Sebastian Andrzej Siewior, Vlastimil Babka, linux-mm, cgroups,
	linux-kernel, Meta kernel team

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.

Shakeel Butt (4):
  memcg: simplify consume_stock
  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 | 174 ++++++++++++++++++++++++++++--------------------
 1 file changed, 102 insertions(+), 72 deletions(-)

-- 
2.47.1


^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2025-04-30 15:11 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-04-29 23:04 [PATCH 0/4] memcg: decouple memcg and objcg stocks Shakeel Butt
2025-04-29 23:04 ` [PATCH 1/4] memcg: simplify consume_stock Shakeel Butt
2025-04-29 23:51   ` Alexei Starovoitov
2025-04-30  4:37     ` Shakeel Butt
2025-04-30 15:11       ` Sebastian Andrzej Siewior
2025-04-29 23:04 ` [PATCH 2/4] memcg: separate local_trylock for memcg and obj Shakeel Butt
2025-04-30 11:42   ` Vlastimil Babka
2025-04-30 15:03     ` Shakeel Butt
2025-04-29 23:04 ` [PATCH 3/4] memcg: completely decouple memcg and obj stocks Shakeel Butt
2025-04-30 12:21   ` Vlastimil Babka
2025-04-29 23:04 ` [PATCH 4/4] memcg: no irq disable for memcg stock lock Shakeel Butt
2025-04-30 12:26   ` Vlastimil Babka

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).