Messages in this thread |  | | Date | Mon, 7 Apr 2008 10:43:37 -0700 | From | "Paul Menage" <> | Subject | Re: [-mm] Disable the memory controller by default (v2) |
| |
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
|  |