From: Ying Han <yinghan@google.com>
To: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>,
KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>,
Mel Gorman <mel@csn.ul.ie>, Rik van Riel <riel@redhat.com>,
Minchan Kim <minchan.kim@gmail.com>,
Daisuke Nishimura <nishimura@mxp.nes.nec.co.jp>,
Andrew Morton <akpm@linux-foundation.org>
Cc: linux-mm@kvack.org
Subject: [PATCH V2 0/2] Reduce reclaim from per-zone LRU in global kswapd
Date: Mon, 28 Mar 2011 16:51:08 -0700 [thread overview]
Message-ID: <1301356270-26859-1-git-send-email-yinghan@google.com> (raw)
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>
next reply other threads:[~2011-03-28 23:51 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-03-28 23:51 Ying Han [this message]
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1301356270-26859-1-git-send-email-yinghan@google.com \
--to=yinghan@google.com \
--cc=akpm@linux-foundation.org \
--cc=kamezawa.hiroyu@jp.fujitsu.com \
--cc=kosaki.motohiro@jp.fujitsu.com \
--cc=linux-mm@kvack.org \
--cc=mel@csn.ul.ie \
--cc=minchan.kim@gmail.com \
--cc=nishimura@mxp.nes.nec.co.jp \
--cc=riel@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).