lkml.org 
[lkml]   [2008]   [Apr]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [-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


\
 
 \ /
  Last update: 2008-04-07 19:47    [W:0.049 / U:3.420 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site