From: Balbir Singh <balbir@linux.vnet.ibm.com>
To: andi@firstfloor.org, Andrew Morton <akpm@linux-foundation.org>
Cc: YAMAMOTO Takashi <yamamoto@valinux.co.jp>,
Paul Menage <menage@google.com>,
linux-kernel@vger.kernel.org, linux-mm@kvack.org,
Pavel Emelianov <xemul@openvz.org>,
hugh@veritas.com, Balbir Singh <balbir@linux.vnet.ibm.com>,
KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Subject: [-mm] Disable the memory controller by default
Date: Mon, 07 Apr 2008 17:21:37 +0530 [thread overview]
Message-ID: <20080407115137.24124.59692.sendpatchset@localhost.localdomain> (raw)
Due to the overhead of the memory controller. The
memory controller is now disabled by default. This patch changes
cgroup_disable to cgroup_toggle, so that each controller can decide
whether it wants to be enabled/disabled by default.
If everyone agrees on this approach and likes it, should we push this
into 2.6.25?
Signed-off-by: Balbir Singh <balbir@linux.vnet.ibm.com>
---
Documentation/kernel-parameters.txt | 5 +++--
kernel/cgroup.c | 11 ++++++-----
mm/memcontrol.c | 1 +
3 files changed, 10 insertions(+), 7 deletions(-)
diff -puN kernel/cgroup.c~memory-controller-default-option-off kernel/cgroup.c
--- linux-2.6.25-rc8/kernel/cgroup.c~memory-controller-default-option-off 2008-04-07 16:24:28.000000000 +0530
+++ linux-2.6.25-rc8-balbir/kernel/cgroup.c 2008-04-07 16:47:48.000000000 +0530
@@ -3063,7 +3063,7 @@ static void cgroup_release_agent(struct
mutex_unlock(&cgroup_mutex);
}
-static int __init cgroup_disable(char *str)
+static int __init cgroup_toggle(char *str)
{
int i;
char *token;
@@ -3076,13 +3076,14 @@ static int __init cgroup_disable(char *s
struct cgroup_subsys *ss = subsys[i];
if (!strcmp(token, ss->name)) {
- ss->disabled = 1;
- printk(KERN_INFO "Disabling %s control group"
- " subsystem\n", ss->name);
+ ss->disabled = !ss->disabled;
+ if (ss->disabled)
+ printk(KERN_INFO "%s control group "
+ "is disabled", ss->name);
break;
}
}
}
return 1;
}
-__setup("cgroup_disable=", cgroup_disable);
+__setup("cgroup_toggle=", cgroup_toggle);
diff -puN mm/memcontrol.c~memory-controller-default-option-off mm/memcontrol.c
--- linux-2.6.25-rc8/mm/memcontrol.c~memory-controller-default-option-off 2008-04-07 16:24:28.000000000 +0530
+++ linux-2.6.25-rc8-balbir/mm/memcontrol.c 2008-04-07 16:40:22.000000000 +0530
@@ -1104,4 +1104,5 @@ struct cgroup_subsys mem_cgroup_subsys =
.populate = mem_cgroup_populate,
.attach = mem_cgroup_move_task,
.early_init = 0,
+ .disabled = 1,
};
diff -puN Documentation/kernel-parameters.txt~memory-controller-default-option-off Documentation/kernel-parameters.txt
--- linux-2.6.25-rc8/Documentation/kernel-parameters.txt~memory-controller-default-option-off 2008-04-07 16:38:25.000000000 +0530
+++ linux-2.6.25-rc8-balbir/Documentation/kernel-parameters.txt 2008-04-07 17:20:08.000000000 +0530
@@ -381,9 +381,10 @@ and is between 256 and 4096 characters.
ccw_timeout_log [S390]
See Documentation/s390/CommonIO for details.
- cgroup_disable= [KNL] Disable a particular controller
- Format: {name of the controller(s) to disable}
+ cgroup_toggle= [KNL] Toggle (enable/disable) a particular controller
+ Format: {name of the controller(s) to enable/disable}
{Currently supported controllers - "memory"}
+ {The memory controller is disabled by default}
checkreqprot [SELINUX] Set initial checkreqprot flag value.
Format: { "0" | "1" }
_
--
Warm Regards,
Balbir Singh
Linux Technology Center
IBM, ISTL
next reply other threads:[~2008-04-07 11:53 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-04-07 11:51 Balbir Singh [this message]
2008-04-07 12:03 ` [-mm] Disable the memory controller by default Andi Kleen
2008-04-07 12:03 ` Balbir Singh
2008-04-07 12:16 ` Andi Kleen
2008-04-07 12:16 ` KOSAKI Motohiro
2008-04-07 12:16 ` Balbir Singh
2008-04-07 17:48 ` Paul Menage
2008-04-07 12:12 ` KOSAKI Motohiro
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=20080407115137.24124.59692.sendpatchset@localhost.localdomain \
--to=balbir@linux.vnet.ibm.com \
--cc=akpm@linux-foundation.org \
--cc=andi@firstfloor.org \
--cc=hugh@veritas.com \
--cc=kamezawa.hiroyu@jp.fujitsu.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=menage@google.com \
--cc=xemul@openvz.org \
--cc=yamamoto@valinux.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.