From: "Paul Menage" <menage@google.com>
To: Balbir Singh <balbir@linux.vnet.ibm.com>
Cc: andi@firstfloor.org, Andrew Morton <akpm@linux-foundation.org>,
YAMAMOTO Takashi <yamamoto@valinux.co.jp>,
linux-kernel@vger.kernel.org, linux-mm@kvack.org,
Pavel Emelianov <xemul@openvz.org>,
hugh@veritas.com,
KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Subject: Re: [-mm] Disable the memory controller by default (v2)
Date: Mon, 7 Apr 2008 10:43:37 -0700 [thread overview]
Message-ID: <6599ad830804071043j33212a6kbeb4ef7d79e17f5c@mail.gmail.com> (raw)
In-Reply-To: <20080407130215.26565.81715.sendpatchset@localhost.localdomain>
On Mon, Apr 7, 2008 at 6:02 AM, Balbir Singh <balbir@linux.vnet.ibm.com> wrote:
> return 1;
> }
> __setup("cgroup_disable=", cgroup_disable);
> +
> +static int __init cgroup_enable(char *str)
> +{
> + int i;
> + char *token;
> +
> + while ((token = strsep(&str, ",")) != NULL) {
> + if (!*token)
> + continue;
> +
> + for (i = 0; i < CGROUP_SUBSYS_COUNT; i++) {
> + struct cgroup_subsys *ss = subsys[i];
> +
> + if (!strcmp(token, ss->name)) {
> + ss->disabled = 0;
> + printk(KERN_INFO "%s control group "
> + "is enabled\n", ss->name);
> + break;
> + }
> + }
> + }
> + return 1;
> +}
> +__setup("cgroup_enable=", cgroup_enable);
Good idea - but you could just use the same handler function for both
of these (with a one-line wrapper for each to pass disabled=1 or
disabled=0)
Paul
next prev parent reply other threads:[~2008-04-07 17:43 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-04-07 13:02 Balbir Singh
2008-04-07 13:22 ` KOSAKI Motohiro
2008-04-07 17:43 ` Paul Menage [this message]
2008-04-08 1:09 ` KAMEZAWA Hiroyuki
2008-04-08 2:31 ` Balbir Singh
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=6599ad830804071043j33212a6kbeb4ef7d79e17f5c@mail.gmail.com \
--to=menage@google.com \
--cc=akpm@linux-foundation.org \
--cc=andi@firstfloor.org \
--cc=balbir@linux.vnet.ibm.com \
--cc=hugh@veritas.com \
--cc=kamezawa.hiroyu@jp.fujitsu.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox