Skip to content

memcg: remove the v1 soft limit

Shakeel Butt cgroups linux-mm lkml 2 versions – Applied

Status from this message: [merged mm-stable] memcg-simplify-v1-event-ratelimiting.patch removed from -mm tree

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest8 patches 1 replyApplied 8/8
  2. v19 patches 18 repliesSuperseded 1 of 9 applied

Patches in v2 All 8 applied

#Subject and filesSizeRepliesApplied
1/8memcg: remove v1 soft limit reclaiminclude/linux/memcontrol.h mm/memcontrol-v1.c mm/vmscan.c+6 -2200 repliesApplied
2/8memcg: remove mem_cgroup_shrink_node()mm/internal.h mm/vmscan.c+0 -450 repliesApplied
3/8memcg: remove the soft limit reclaim tracepointsinclude/trace/events/vmscan.h+0 -140 repliesApplied
4/8memcg: remove the soft limit rbtreemm/memcontrol-v1.c mm/memcontrol-v1.h mm/memcontrol.c+2 -1770 repliesApplied
5/8memcg: remove lru_gen_soft_reclaim()include/linux/mmzone.h mm/vmscan.c+13 -330 repliesApplied
6/8memcg: remove the per-node soft limit tree fieldsinclude/linux/memcontrol.h+0 -130 repliesApplied
7/8memcg: remove mem_cgroup->soft_limitinclude/linux/memcontrol.h mm/memcontrol-v1.h mm/memcontrol.c+0 -100 repliesApplied
8/8memcg: simplify v1 event ratelimitingmm/memcontrol-v1.c mm/memcontrol-v1.h mm/memcontrol.c+14 -370 repliesApplied

Reviews trailers per patch

All 8 patches have a Reviewed-by or Acked-by.

PatchMichal HockoLorenzo Stoakes (ARM)T.J. Mercier
1/8A-b A-b
2/8A-b A-b
3/8A-b A-b
4/8A-b A-b
5/8A-b R-b
6/8A-b A-b
7/8A-b A-b
8/8A-b A-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 3 reviewers.

Read the v2 thread

Cover letter [PATCH v2 0/8] memcg: remove the v1 soft limit

The v1 soft limit was deprecated in v6.12 by commit 569c4f62d84a ("memcg:
initiate deprecation of v1 soft limit") and nobody has reported depending on it in the ~21 months since. memory.low and memory.min in v2 have covered the same ground for far longer.

The knob has since been made inert by "memcg: make the v1 soft limit knob inert", already queued in mm-hotfixes as a backportable fix for a syzbot report [1]. Nothing can enter the soft limit rbtree anymore, so this series just deletes the machinery that is now dead: the reclaim pass in kswapd and direct reclaim, mem_cgroup_shrink_node() and its tracepoints, the per-node rbtree, lru_gen_soft_reclaim() and the MEMCG_LRU_HEAD op, the per-node tree fields, mem_cgroup->soft_limit, and finally the v1 event ratelimiting which is now down to a single target.

memory.soft_limit_in_bytes itself is untouched: writes stay ignored and reads keep returning the maximum value.

Changes since v1 [2]:
- Dropped "memcg: make the v1 soft limit knob inert" (1/9 in v1), which is already queued in mm-hotfixes, making this an 8-patch series.
- Collected the acks and review tags. No code changes.

Sashiko's v1 review [3] asked whether the softlimit tracepoints, lru_gen_soft_reclaim(), the per-node tree fields and the MEM_CGROUP_TARGET_SOFTLIMIT ratelimiting could go too. They all can and they all do, in patches 3/8, 5/8, 6/8 and 8/8 of this same series.

[1] https://lore.kernel.org/all/[email protected]/
[2] https://lore.kernel.org/all/[email protected]/
[3] https://sashiko.dev/#/patchset/[email protected]

Shakeel Butt (8):
memcg: remove v1 soft limit reclaim
memcg: remove mem_cgroup_shrink_node()
memcg: remove the soft limit reclaim tracepoints
memcg: remove the soft limit rbtree
memcg: remove lru_gen_soft_reclaim()
memcg: remove the per-node soft limit tree fields
memcg: remove mem_cgroup->soft_limit
memcg: simplify v1 event ratelimiting

 include/linux/memcontrol.h    |  27 ---
 include/linux/mmzone.h        |  30 +--
 include/trace/events/vmscan.h |  14 --
 mm/internal.h                 |   4 -
 mm/memcontrol-v1.c            | 392 ++--------------------------------
 mm/memcontrol-v1.h            |  12 +-
 mm/memcontrol.c               |   7 +-
 mm/vmscan.c                   |  96 +--------
 8 files changed, 34 insertions(+), 548 deletions(-)
Signature · 1 line
2.53.0-Meta