Skip to content

mm: memcontrol: clean up the LRU counts tracking

Johannes Weiner cgroups linux-mm lkml 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest6 patches 2 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/6mm: memcontrol: track LRU counts in the vmstats arrayinclude/linux/mm_inline.h+1 -10 replies
2/6mm: memcontrol: replace zone summing with lruvec_page_state()include/linux/memcontrol.h mm/memcontrol.c mm/vmscan.c+2 -200 replies
3/6mm: memcontrol: replace node summing with memcg_page_state()mm/memcontrol.c+6 -31 reply
4/6mm: memcontrol: push down mem_cgroup_node_nr_lru_pages()include/linux/memcontrol.h mm/memcontrol.c mm/workingset.c+10 -150 replies
5/6mm: memcontrol: push down mem_cgroup_nr_lru_pages()mm/memcontrol.c+7 -60 replies
6/6mm: memcontrol: quarantine the mem_cgroup_[node_]nr_lru_pages() APIinclude/linux/mmzone.h mm/memcontrol.c+36 -360 replies

Reviews trailers per patch

None of the 6 patches has a Reviewed-by or Acked-by of their own; the series has one for all of them.

PatchRoman Gushchin
SeriesR-b
1/6
2/6
3/6
4/6
5/6
6/6

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

Read the v1 thread

Cover letter [PATCH 0/6] mm: memcontrol: clean up the LRU counts tracking

[ Resend #2: Sorry about the spam, I mixed up the header fields in
git-send-email and I don't know who did and didn't receive the garbled previous attempt.

Resend #1: Rebased on top of the latest mmots. ]

The memcg LRU stats usage is currently a bit messy. Memcg has private per-zone counters because reclaim needs zone granularity sometimes, but we also have plenty of users that need to awkwardly sum them up to node or memcg granularity. Meanwhile the canonical per-memcg vmstats do not track the LRU counts (NR_INACTIVE_ANON etc.) as you'd expect.

This series enables LRU count tracking in the per-memcg vmstats array such that lruvec_page_state() and memcg_page_state() work on the enum node_stat_item items for the LRU counters. Then it converts all the callers that don't specifically need per-zone numbers over to that.

 include/linux/memcontrol.h | 28 ---------------
 include/linux/mm_inline.h  |  2 +-
 include/linux/mmzone.h     |  5 ---
 mm/memcontrol.c            | 85 +++++++++++++++++++++++++-------------------
 mm/vmscan.c                |  2 +-
 mm/workingset.c            |  5 +--
 6 files changed, 54 insertions(+), 73 deletions(-)