Re: [-mm] Disable the memory controller by default (v2)

From: Paul Menage
Date: Mon Apr 07 2008 - 13:43:55 EST


On Mon, Apr 7, 2008 at 6:02 AM, Balbir Singh <balbir@xxxxxxxxxxxxxxxxxx> 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@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/