Skip to content

RFC memcg: make memcg stats irq safe

Shakeel Butt bpf cgroups linux-mm lkml 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 RFC Latest7 patches 8 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/7memcg: memcg_rstat_updated re-entrant safe against irqsmm/memcontrol.c+13 -82 replies
2/7memcg: move preempt disable to callers of memcg_rstat_updatedmm/memcontrol.c+19 -551 reply
3/7memcg: make mod_memcg_state re-entrant safe against irqsinclude/linux/memcontrol.h mm/memcontrol.c+10 -221 reply
4/7memcg: make count_memcg_events re-entrant safe against irqsinclude/linux/memcontrol.h mm/memcontrol-v1.c mm/memcontrol.c +2 more+23 -361 reply
5/7memcg: make __mod_memcg_lruvec_state re-entrant safe against irqsmm/memcontrol.c+16 -121 reply
6/7memcg: objcg stock trylock without irq disablingmm/memcontrol.c+10 -161 reply
7/7memcg: no stock lock for cpu hot-unplugmm/memcontrol.c+1 -91 reply

Reviews trailers per patch

6 of 7 patches have a Reviewed-by or Acked-by.

PatchVlastimil Babka
1/7
2/7A-b
3/7A-b
4/7A-b
5/7A-b
6/7A-b
7/7A-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [RFC PATCH 0/7] memcg: make memcg stats irq safe

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 an RFC as I am not satisfied with the usage of atomic_* ops in memcg_rstat_updated(). Second I still need to run performance benchmarks (any suggestions/recommendations would be appreciated). Sending this out early to get feedback.

This is based on latest mm-everything branch along with the nmi-safe memcg series [1].

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: objcg stock trylock without irq disabling
memcg: no stock lock for cpu hot-unplug

 include/linux/memcontrol.h |  41 +--------
 mm/memcontrol-v1.c         |   6 +-
 mm/memcontrol.c            | 167 +++++++++++++++----------------------
 mm/swap.c                  |   8 +-
 mm/vmscan.c                |  14 ++--
 5 files changed, 85 insertions(+), 151 deletions(-)
Signature · 1 line
2.47.1