linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [PATCH V2 0/2] Reduce reclaim from per-zone LRU in global kswapd
@ 2011-03-28 23:51 Ying Han
  2011-03-28 23:51 ` [PATCH V2 1/2] count the soft_limit reclaim in global background reclaim Ying Han
  2011-03-28 23:51 ` [PATCH V2 2/2] add stats to monitor soft_limit reclaim Ying Han
  0 siblings, 2 replies; 13+ messages in thread
From: Ying Han @ 2011-03-28 23:51 UTC (permalink / raw)
  To: KOSAKI Motohiro, KAMEZAWA Hiroyuki, Mel Gorman, Rik van Riel,
	Minchan Kim, Daisuke Nishimura, 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 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.

$ egrep 'steal|scan' /dev/cgroup/1/memory.stat
soft_steal 259200
total_soft_steal 259200

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

 Documentation/cgroups/memory.txt |    2 +
 include/linux/memcontrol.h       |   11 ++++++++-
 include/linux/swap.h             |    3 +-
 mm/memcontrol.c                  |   43 ++++++++++++++++++++++++++++++--------
 mm/vmscan.c                      |   16 +++++++++++--
 5 files changed, 60 insertions(+), 15 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] 13+ messages in thread
* [PATCH V2 0/2] memcg:add the soft_limit reclaim in global direct reclaim
@ 2011-05-02 16:50 Ying Han
  2011-05-02 16:50 ` [PATCH V2 2/2] Add stats to monitor soft_limit reclaim Ying Han
  0 siblings, 1 reply; 13+ messages in thread
From: Ying Han @ 2011-05-02 16:50 UTC (permalink / raw)
  To: KOSAKI Motohiro, Minchan Kim, Daisuke Nishimura, Balbir Singh,
	Tejun Heo, Pavel Emelyanov, KAMEZAWA Hiroyuki, Andrew Morton,
	Li Zefan, Mel Gorman, Christoph Lameter, Johannes Weiner,
	Rik van Riel, Hugh Dickins, Michal Hocko, Dave Hansen, Zhu Yanhai
  Cc: linux-mm

We recently added the change in global background reclaim which counts the
return value of soft_limit reclaim. Now this patch adds the similar logic
on global direct reclaim.

We should skip scanning global LRU on shrink_zone if soft_limit reclaim does
enough work. This is the first step where we start with counting the nr_scanned
and nr_reclaimed from soft_limit reclaim into global scan_control.

The patch is based on mmotm-2011-04-14-15-08 plus
0001-check-pageunevictable-in-lru_deactivate_fn.patch from Minchan.

Ying Han (2):
  Add the soft_limit reclaim in global direct reclaim.
  Add stats to monitor soft_limit reclaim

 Documentation/cgroups/memory.txt |   16 +++++++--
 mm/memcontrol.c                  |   68 ++++++++++++++++++++++++++++----------
 mm/vmscan.c                      |   16 ++++++++-
 3 files changed, 76 insertions(+), 24 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] 13+ messages in thread

end of thread, other threads:[~2011-05-03 16:59 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-03-28 23:51 [PATCH V2 0/2] Reduce reclaim from per-zone LRU in global kswapd Ying Han
2011-03-28 23:51 ` [PATCH V2 1/2] count the soft_limit reclaim in global background reclaim Ying Han
2011-03-29  1:00   ` KAMEZAWA Hiroyuki
2011-03-29  1:29   ` KOSAKI Motohiro
2011-03-28 23:51 ` [PATCH V2 2/2] add stats to monitor soft_limit reclaim Ying Han
2011-03-29  1:22   ` KAMEZAWA Hiroyuki
2011-03-29  4:38     ` Ying Han
2011-03-29  2:32   ` Daisuke Nishimura
2011-03-29  4:55     ` Ying Han
  -- strict thread matches above, loose matches on Subject: below --
2011-05-02 16:50 [PATCH V2 0/2] memcg:add the soft_limit reclaim in global direct reclaim Ying Han
2011-05-02 16:50 ` [PATCH V2 2/2] Add stats to monitor soft_limit reclaim Ying Han
2011-05-02 16:52   ` Ying Han
2011-05-03 13:54   ` Rik van Riel
2011-05-03 16:59     ` 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).