bpf.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/7] memcg: make memcg stats irq safe
@ 2025-05-14  5:08 Shakeel Butt
  2025-05-14  5:08 ` [PATCH 1/7] memcg: memcg_rstat_updated re-entrant safe against irqs Shakeel Butt
                   ` (6 more replies)
  0 siblings, 7 replies; 10+ messages in thread
From: Shakeel Butt @ 2025-05-14  5:08 UTC (permalink / raw)
  To: Andrew Morton
  Cc: Johannes Weiner, Michal Hocko, Roman Gushchin, Muchun Song,
	Vlastimil Babka, Alexei Starovoitov, Sebastian Andrzej Siewior,
	Harry Yoo, Yosry Ahmed, bpf, linux-mm, cgroups, linux-kernel,
	Meta kernel team

This series converts memcg stats to be irq safe i.e. memcg stats can be
updated in any context (task, softirq or hardirq) without disabling the
irqs. This is still not nmi-safe on all architectures but after this
series converting memcg charging and stats nmi-safe will be easier.


Changes since RFC[1]:
--------------------
1. Rebased on next-20250513 (mm tree has some conflicts with cgroup
   tree).
2. Does not depend of nmi-safe memcg series [2].
3. Made memcg_rstat_updated re-entrant using this_cpu_* ops as suggested
   by Vlastimil.
4. Fixes some spelling mistakes as suggested by Vlastimil.
5. Rearranged the 6th and 7th patch as suggested by Vlastimil.

Link: http://lore.kernel.org/20250513031316.2147548-1-shakeel.butt@linux.dev [1]
Link: http://lore.kernel.org/20250509232859.657525-1-shakeel.butt@linux.dev [2]

Shakeel Butt (7):
  memcg: memcg_rstat_updated re-entrant safe against irqs
  memcg: move preempt disable to callers of memcg_rstat_updated
  memcg: make mod_memcg_state re-entrant safe against irqs
  memcg: make count_memcg_events re-entrant safe against irqs
  memcg: make __mod_memcg_lruvec_state re-entrant safe against irqs
  memcg: no stock lock for cpu hot-unplug
  memcg: objcg stock trylock without irq disabling

 include/linux/memcontrol.h |  41 +--------
 mm/memcontrol-v1.c         |   6 +-
 mm/memcontrol.c            | 170 +++++++++++++++----------------------
 mm/swap.c                  |   8 +-
 mm/vmscan.c                |  14 +--
 5 files changed, 86 insertions(+), 153 deletions(-)

-- 
2.47.1


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

end of thread, other threads:[~2025-05-14 16:39 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-05-14  5:08 [PATCH 0/7] memcg: make memcg stats irq safe Shakeel Butt
2025-05-14  5:08 ` [PATCH 1/7] memcg: memcg_rstat_updated re-entrant safe against irqs Shakeel Butt
2025-05-14  9:50   ` Vlastimil Babka
2025-05-14 16:39     ` Shakeel Butt
2025-05-14  5:08 ` [PATCH 2/7] memcg: move preempt disable to callers of memcg_rstat_updated Shakeel Butt
2025-05-14  5:08 ` [PATCH 3/7] memcg: make mod_memcg_state re-entrant safe against irqs Shakeel Butt
2025-05-14  5:08 ` [PATCH 4/7] memcg: make count_memcg_events " Shakeel Butt
2025-05-14  5:08 ` [PATCH 5/7] memcg: make __mod_memcg_lruvec_state " Shakeel Butt
2025-05-14  5:08 ` [PATCH 6/7] memcg: no stock lock for cpu hot-unplug Shakeel Butt
2025-05-14  5:08 ` [PATCH 7/7] memcg: objcg stock trylock without irq disabling Shakeel Butt

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).