Skip to content

mm: workingset: make shadow node shrinker memcg aware

Vladimir Davydov linux-mm lkml 2 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest6 patches 2 repliesIn review
  2. v15 patches 7 repliesSuperseded

Changes in v2 from the cover letter

- Use (FILE_ACTIVE+FILE_INACTIVE)/2 instead of FILE_ACTIVE for maximal refault distance (Johannes).

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/6mm: memcontrol: enable kmem accounting for all cgroups in the legacy hierarchymm/memcontrol.c+5 -360 replies
2/6mm: vmscan: pass root_mem_cgroup instead of NULL to memcg aware shrinkermm/vmscan.c+10 -50 replies
3/6mm: memcontrol: zap memcg_kmem_online helperinclude/linux/memcontrol.h mm/memcontrol.c mm/slab_common.c+2 -120 replies
4/6radix-tree: account radix_tree_node to memory cgrouplib/radix-tree.c+13 -30 replies
5/6mm: workingset: size shadow nodes lru basing on file cache sizemm/workingset.c+3 -11 reply
6/6mm: workingset: make shadow node shrinker memcg awareinclude/linux/memcontrol.h mm/memcontrol.c mm/workingset.c+19 -61 reply

Reviews trailers per patch

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

PatchJohannes Weiner
1/6A-b
2/6A-b
3/6A-b
4/6A-b
5/6A-b
6/6A-b

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

Read the v2 thread

Cover letter [PATCH v2 0/6] mm: workingset: make shadow node shrinker memcg aware

Hi,

Workingset code was recently made memcg aware, but shadow node shrinker is still global. As a result, one small cgroup can consume all memory available for shadow nodes, possibly hurting other cgroups by reclaiming their shadow nodes, even though reclaim distances stored in its shadow nodes have no effect. To avoid this, we need to make shadow node shrinker memcg aware.

The actual work is done in patch 6 of the series. Patches 1 and 2 prepare memcg/shrinker infrastructure for the change. Patch 3 is just a collateral cleanup. Patch 4 makes radix_tree_node accounted, which is necessary for making shadow node shrinker memcg aware. Patch 5 reduces shadow nodes overhead in case workload mostly uses anonymous pages.

Changes in v2:
- Use (FILE_ACTIVE+FILE_INACTIVE)/2 instead of FILE_ACTIVE for maximal refault distance (Johannes).

Thanks,

Vladimir Davydov (6):
mm: memcontrol: enable kmem accounting for all cgroups in the legacy
hierarchy
mm: vmscan: pass root_mem_cgroup instead of NULL to memcg aware
shrinker
mm: memcontrol: zap memcg_kmem_online helper
radix-tree: account radix_tree_node to memory cgroup
mm: workingset: size shadow nodes lru basing on file cache size
mm: workingset: make shadow node shrinker memcg aware

 include/linux/memcontrol.h | 20 +++++++++----------
 lib/radix-tree.c           | 16 +++++++++++++---
 mm/memcontrol.c            | 48 ++++++++--------------------------------------
 mm/slab_common.c           |  2 +-
 mm/vmscan.c                | 15 ++++++++++-----
 mm/workingset.c            | 10 ++++++++--
 6 files changed, 50 insertions(+), 61 deletions(-)
Signature · 7 lines
2.1.4

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to [email protected].  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>