From: Daisuke Nishimura <nishimura@mxp.nes.nec.co.jp>
From: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
To: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Cc: linux-mm@kvack.org, balbir@linux.vnet.ibm.com,
nishimura@mxp.nes.nec.co.jp
Subject: [PATCH -mm 3/5] memcg: mem+swap controller Kconfig
Date: Fri, 17 Oct 2008 20:01:58 +0900 [thread overview]
Message-ID: <20081017200158.3ffa4312.nishimura@mxp.nes.nec.co.jp> (raw)
In-Reply-To: <20081017194804.fce28258.nishimura@mxp.nes.nec.co.jp>
Add config for mem+swap controller and defines a helper macro
For stacking several readable size of patches, this marks config
as Broken....later patch will remove this word.
Signed-off-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
diff --git a/init/Kconfig b/init/Kconfig
index a404869..14c8205 100644
--- a/init/Kconfig
+++ b/init/Kconfig
@@ -415,6 +415,16 @@ config CGROUP_MEM_RES_CTLR
This config option also selects MM_OWNER config option, which
could in turn add some fork/exit overhead.
+config CGROUP_MEM_RES_CTLR_SWAP
+ bool "Memory Resource Controller Swap Extension (Broken)"
+ depends on CGROUP_MEM_RES_CTLR && SWAP && EXPERIMENTAL
+ help
+ Add swap management feature to memory resource controller. By this,
+ you can control swap consumption per cgroup by limiting the total
+ amount of memory+swap. Because this records additional informaton
+ at swap-out, this consumes extra memory. If you use 32bit system or
+ small memory system, please be careful to enable this.
+
config CGROUP_MEMRLIMIT_CTLR
bool "Memory resource limit controls for cgroups"
depends on CGROUPS && RESOURCE_COUNTERS && MMU
diff --git a/mm/memcontrol.c b/mm/memcontrol.c
index 5ef5a5c..023c7bc 100644
--- a/mm/memcontrol.c
+++ b/mm/memcontrol.c
@@ -41,6 +41,13 @@ struct cgroup_subsys mem_cgroup_subsys __read_mostly;
#define MEM_CGROUP_RECLAIM_RETRIES 5
#define NR_MEMCGRP_ID (32767)
+#ifdef CONFIG_CGROUP_MEM_RES_CTLR_SWAP
+#define do_swap_account (1)
+#else
+#define do_swap_account (0)
+#endif
+
+
/*
* Statistics for memory cgroup.
*/
--
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>
next prev parent reply other threads:[~2008-10-17 11:01 UTC|newest]
Thread overview: 60+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-10-17 10:48 [RFC][PATCH -mm 0/5] mem+swap resource controller(trial patch) Daisuke Nishimura
2008-10-17 10:56 ` [PATCH -mm 1/5] memcg: replace res_counter Daisuke Nishimura
2008-10-20 19:53 ` Paul Menage
2008-10-21 1:14 ` KAMEZAWA Hiroyuki
2008-10-21 1:29 ` Paul Menage
2008-10-21 1:49 ` KAMEZAWA Hiroyuki
2008-10-21 2:15 ` Paul Menage
2008-10-21 2:50 ` KAMEZAWA Hiroyuki
2008-10-21 2:20 ` Paul Menage
2008-10-21 3:03 ` KAMEZAWA Hiroyuki
2008-10-21 6:30 ` Paul Menage
2008-10-21 5:30 ` Balbir Singh
2008-10-21 5:39 ` KAMEZAWA Hiroyuki
2008-10-21 6:20 ` [memcg BUG] unable to handle kernel NULL pointer derefence at 00000000 Li Zefan
2008-10-21 6:25 ` KAMEZAWA Hiroyuki
2008-10-21 6:28 ` Li Zefan
2008-10-21 6:38 ` Daisuke Nishimura
2008-10-21 6:54 ` KAMEZAWA Hiroyuki
2008-10-21 7:04 ` Li Zefan
2008-10-21 7:16 ` KAMEZAWA Hiroyuki
2008-10-21 7:21 ` Li Zefan
2008-10-21 8:18 ` KAMEZAWA Hiroyuki
2008-10-21 8:34 ` Mel Gorman
2008-10-21 8:38 ` KAMEZAWA Hiroyuki
2008-10-21 8:35 ` Li Zefan
2008-10-21 8:36 ` KAMEZAWA Hiroyuki
2008-10-21 8:57 ` KAMEZAWA Hiroyuki
2008-10-21 9:13 ` Li Zefan
2008-10-21 9:25 ` KAMEZAWA Hiroyuki
2008-10-21 9:54 ` Li Zefan
2008-10-21 10:14 ` KAMEZAWA Hiroyuki
2008-10-21 10:57 ` Li Zefan
2008-10-21 11:00 ` KAMEZAWA Hiroyuki
2008-10-21 11:09 ` KAMEZAWA Hiroyuki
2008-10-21 11:13 ` KAMEZAWA Hiroyuki
2008-10-21 11:19 ` Ingo Molnar
2008-10-21 11:23 ` KAMEZAWA Hiroyuki
2008-10-21 11:28 ` Ingo Molnar
2008-10-21 11:32 ` KAMEZAWA Hiroyuki
2008-10-21 11:38 ` Ingo Molnar
2008-10-22 2:13 ` Daisuke Nishimura
2008-10-22 2:31 ` KAMEZAWA Hiroyuki
2008-10-21 11:29 ` Balbir Singh
2008-10-21 11:34 ` KAMEZAWA Hiroyuki
2008-10-21 12:00 ` KAMEZAWA Hiroyuki
2008-10-21 12:14 ` Balbir Singh
2008-10-21 13:09 ` KAMEZAWA Hiroyuki
2008-10-21 13:25 ` Balbir Singh
2008-10-21 13:34 ` Balbir Singh
2008-10-21 13:44 ` [memcg BUG] unable to handle kernel NULL pointer derefence at00000000 亀澤 寛之
2008-10-21 10:58 ` [memcg BUG] unable to handle kernel NULL pointer derefence at 00000000 Balbir Singh
2008-10-21 9:33 ` Daisuke Nishimura
2008-10-21 9:41 ` KAMEZAWA Hiroyuki
2008-10-21 10:15 ` Daisuke Nishimura
2008-10-17 10:59 ` [PATCH -mm 2/5] memcg: mem_cgroup private ID Daisuke Nishimura
2008-10-17 11:01 ` Daisuke Nishimura, KAMEZAWA Hiroyuki [this message]
2008-10-17 11:04 ` [PATCH -mm 4/5] memcg: mem+swap counter Daisuke Nishimura
2008-10-17 11:06 ` [PATCH -mm 5/5] memcg: mem+swap accounting Daisuke Nishimura
2008-10-20 0:24 ` [RFC][PATCH -mm 0/5] mem+swap resource controller(trial patch) KAMEZAWA Hiroyuki
2008-10-20 2:53 ` Daisuke Nishimura
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=20081017200158.3ffa4312.nishimura@mxp.nes.nec.co.jp \
--to=nishimura@mxp.nes.nec.co.jp \
--cc=balbir@linux.vnet.ibm.com \
--cc=kamezawa.hiroyu@jp.fujitsu.com \
--cc=linux-mm@kvack.org \
/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