From: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
To: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Cc: "linux-mm@kvack.org" <linux-mm@kvack.org>,
"balbir@linux.vnet.ibm.com" <balbir@linux.vnet.ibm.com>,
"nishimura@mxp.nes.nec.co.jp" <nishimura@mxp.nes.nec.co.jp>,
"kosaki.motohiro@jp.fujitsu.com" <kosaki.motohiro@jp.fujitsu.com>
Subject: [RFC][PATCH 4/4] memcg: softlimit documenation
Date: Mon, 9 Mar 2009 16:43:04 +0900 [thread overview]
Message-ID: <20090309164304.7725fcc9.kamezawa.hiroyu@jp.fujitsu.com> (raw)
In-Reply-To: <20090309163745.5e3805ba.kamezawa.hiroyu@jp.fujitsu.com>
From: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Documentation for softlimit
Changelog: (v1)->(v2)
- fixed typos.
- added more precise text.
Signed-off-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
---
Documentation/cgroups/memory.txt | 29 +++++++++++++++++++++++++++++
1 file changed, 29 insertions(+)
Index: develop/Documentation/cgroups/memory.txt
===================================================================
--- develop.orig/Documentation/cgroups/memory.txt
+++ develop/Documentation/cgroups/memory.txt
@@ -322,6 +322,35 @@ will be charged as a new owner of it.
- a cgroup which uses hierarchy and it has child cgroup.
- a cgroup which uses hierarchy and not the root of hierarchy.
+5.4 softlimit
+ Memory cgroup supports softlimit and has 2 parameters for control.
+
+ - memory.softlimit_in_bytes
+ softlimit for this cgroup
+
+ - memory.softlimit_priority
+ priority of this cgroup at softlimit reclaim
+ Allowed priority level is 0-8 and 0 is the lowest, 8 is the highest.
+ If 8 is specified, this will not be target of softlimit.
+
+ At memory shortage of the system (or local node/zone), softlimit helps
+ kswapd(), a global memory reclaim kernel thread, and informs victim cgroup
+ to be shrinked to kswapd.
+
+ Victim selection logic:
+ *Now*, static priority round-robin queue is used.
+
+ The kernel searches from the lowest priroty(0) up to the highest(7).
+ (priority (8) will never be scanned.)
+ If it finds a cgroup which has memory larger than softlimit, steal memory
+ from it. If multiple cgroups are on the same priority, each cgroup will be a
+ victim in turn.
+
+ Note: the kernel splits memory into zones and the system's memory shortage
+ is usually shorgage of zone's memory. So, even if a memcg'spriority is low,
+ it may not be selected because target zone's memory is not included in it.
+
+ Todo: some kind of dynamic-priority scheduler is fine.
6. Hierarchy support
--
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/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
prev parent reply other threads:[~2009-03-09 7:44 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-03-09 7:37 [RFC][PATCH] memcg: softlimit (Another one) v3 KAMEZAWA Hiroyuki
2009-03-09 7:39 ` [RFC][PATCH 1/4] memcg: add softlimit interface and utilitiy function KAMEZAWA Hiroyuki
2009-03-09 7:44 ` Balbir Singh
2009-03-09 7:55 ` KAMEZAWA Hiroyuki
2009-03-09 8:48 ` Balbir Singh
2009-03-10 5:53 ` KAMEZAWA Hiroyuki
2009-03-10 8:03 ` Balbir Singh
2009-03-10 8:31 ` Balbir Singh
2009-03-09 8:29 ` KAMEZAWA Hiroyuki
2009-03-09 8:54 ` Balbir Singh
2009-03-09 9:07 ` KAMEZAWA Hiroyuki
2009-03-09 7:41 ` [RFC][PATCH 2/4] memcg: softlimit priority and victim scheduler KAMEZAWA Hiroyuki
2009-03-09 7:42 ` [RFC][PATCH 3/4] memcg: softlimit caller via kswapd KAMEZAWA Hiroyuki
2009-03-10 19:02 ` Balbir Singh
2009-03-10 23:52 ` KAMEZAWA Hiroyuki
2009-03-12 0:05 ` KOSAKI Motohiro
2009-03-12 0:08 ` KAMEZAWA Hiroyuki
2009-03-09 7:43 ` KAMEZAWA Hiroyuki [this message]
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=20090309164304.7725fcc9.kamezawa.hiroyu@jp.fujitsu.com \
--to=kamezawa.hiroyu@jp.fujitsu.com \
--cc=balbir@linux.vnet.ibm.com \
--cc=kosaki.motohiro@jp.fujitsu.com \
--cc=linux-mm@kvack.org \
--cc=nishimura@mxp.nes.nec.co.jp \
/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