Skip to content

Reduce reclaim from per-zone LRU in global kswapd

Ying Han linux-mm 3 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v3 Latest2 patches 5 repliesIn review
  2. v22 patches 6 repliesSuperseded
  3. v12 patches 8 repliesSuperseded

Patches in v3 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2count the soft_limit reclaim in global background reclaiminclude/linux/memcontrol.h include/linux/swap.h mm/memcontrol.c +1 more+39 -153 replies
2/2add stats to monitor soft_limit reclaimDocumentation/cgroups/memory.txt include/linux/memcontrol.h mm/memcontrol.c+29 -12 replies

Reviews trailers per patch

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

PatchDaisuke NishimuraKAMEZAWA Hiroyuki
1/2A-b
2/2A-b R-b

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

Read the v3 thread

Cover letter [PATCH V3 0/2] Reduce reclaim from per-zone LRU in global kswapd

The global kswapd scans per-zone LRU and reclaims pages regardless of the cgroup. It breaks memory isolation since one cgroup can end up reclaiming pages from another cgroup. Instead we should rely on memcg-aware target reclaim including per-memcg kswapd and soft_limit hierarchical reclaim under memory pressure.

In the global background reclaim, we do soft reclaim before scanning the per-zone LRU. However, the return value is ignored. This patch is the first step to skip shrink_zone() if soft_limit reclaim does enough work.

This is part of the effort which tries to reduce reclaiming pages in global LRU in memcg. The per-memcg background reclaim patchset further enhances the per-cgroup targetting reclaim, which I should have V4 posted shortly.

Try running multiple memory intensive workloads within seperate memcgs. Watch the counters of soft_steal in memory.stat.

$ cat /dev/cgroup/A/memory.stat | grep 'soft'
soft_steal 240000
soft_scan 240000
total_soft_steal 240000
total_soft_scan 240000

Ying Han (2):
count the soft_limit reclaim in global background reclaim add stats to monitor soft_limit reclaim

 Documentation/cgroups/memory.txt |    4 +++
 include/linux/memcontrol.h       |    7 +++--
 include/linux/swap.h             |    3 +-
 mm/memcontrol.c                  |   54 +++++++++++++++++++++++++++++++------
 mm/vmscan.c                      |   16 +++++++++--
 5 files changed, 68 insertions(+), 16 deletions(-)
Signature · 8 lines
1.7.3.1

--
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/ .
Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>