linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/2] Reduce reclaim from per-zone LRU in global kswapd
@ 2011-03-28  6:12 Ying Han
  2011-03-28  6:12 ` [PATCH 1/2] check the return value of soft_limit reclaim Ying Han
  2011-03-28  6:12 ` [PATCH 2/2] add two stats to monitor " Ying Han
  0 siblings, 2 replies; 11+ messages in thread
From: Ying Han @ 2011-03-28  6:12 UTC (permalink / raw)
  To: KOSAKI Motohiro, Minchan Kim, Rik van Riel, Mel Gorman,
	KAMEZAWA Hiroyuki, Andrew Morton
  Cc: linux-mm

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 adds the logic
where no per-zone reclaim happens if the soft reclaim raise the free pages
above the zone's high_wmark.

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 for both soft_steal in memory.stat and skip_reclaim in zoneinfo.

$ egrep 'steal|scan' /dev/cgroup/A/memory.stat
soft_steal 304640
total_soft_steal 304640

$ egrep skip /proc/zoneinfo
nr_skip_reclaim_global 0
nr_skip_reclaim_global 381
nr_skip_reclaim_global 387

Ying Han (2):
  check the return value of soft_limit reclaim
  add two stats to monitor soft_limit reclaim.

 Documentation/cgroups/memory.txt |    2 ++
 include/linux/memcontrol.h       |    5 +++++
 include/linux/mmzone.h           |    1 +
 mm/memcontrol.c                  |   14 ++++++++++++++
 mm/vmscan.c                      |   16 +++++++++++++++-
 mm/vmstat.c                      |    1 +
 6 files changed, 38 insertions(+), 1 deletions(-)

-- 
1.7.3.1

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  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:"dont@kvack.org"> email@kvack.org </a>

^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2011-03-29 17:39 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-03-28  6:12 [PATCH 0/2] Reduce reclaim from per-zone LRU in global kswapd Ying Han
2011-03-28  6:12 ` [PATCH 1/2] check the return value of soft_limit reclaim Ying Han
2011-03-28  6:39   ` KOSAKI Motohiro
2011-03-28  8:44     ` KAMEZAWA Hiroyuki
2011-03-28 15:29       ` Minchan Kim
2011-03-28 17:35       ` Ying Han
2011-03-28 16:44     ` Ying Han
2011-03-28  7:33   ` Daisuke Nishimura
2011-03-29 15:38     ` Balbir Singh
2011-03-29 17:39       ` Ying Han
2011-03-28  6:12 ` [PATCH 2/2] add two stats to monitor " Ying Han

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).