[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <6599ad830804071043j33212a6kbeb4ef7d79e17f5c@mail.gmail.com>
Date: Mon, 7 Apr 2008 10:43:37 -0700
From: "Paul Menage" <menage@...gle.com>
To: "Balbir Singh" <balbir@...ux.vnet.ibm.com>
Cc: andi@...stfloor.org, "Andrew Morton" <akpm@...ux-foundation.org>,
"YAMAMOTO Takashi" <yamamoto@...inux.co.jp>,
linux-kernel@...r.kernel.org, linux-mm@...ck.org,
"Pavel Emelianov" <xemul@...nvz.org>, hugh@...itas.com,
"KAMEZAWA Hiroyuki" <kamezawa.hiroyu@...fujitsu.com>
Subject: Re: [-mm] Disable the memory controller by default (v2)
On Mon, Apr 7, 2008 at 6:02 AM, Balbir Singh <balbir@...ux.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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists