Due to the overhead of the memory controller. The
memory controller is now disabled by default. This patch changes
cgroup_disable to cgroup_toggle, so that each controller can decide
whether it wants to be enabled/disabled by default.

If everyone agrees on this approach and likes it, should we push this
into 2.6.25?

--
Warm Regards,
Balbir Singh
Linux Technology Center
IBM, ISTL
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email]majordomo@vger.kernel.org[/email]
More majordomo info at [url]http://vger.kernel.org/majordomo-info.html[/url]
Please read the FAQ at [url]http://www.tux.org/lkml/[/url]

04-07-2008, 12:10 PM

unix

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

Andi Kleen wrote:[color=blue]
> On Mon, Apr 07, 2008 at 05:21:37PM +0530, Balbir Singh wrote:[color=green]
>>
>> Due to the overhead of the memory controller. The
>> memory controller is now disabled by default. This patch changes
>> cgroup_disable to cgroup_toggle, so that each controller can decide
>> whether it wants to be enabled/disabled by default.
>>
>> If everyone agrees on this approach and likes it, should we push this
>> into 2.6.25?[/color]
>
> First I like the change to make it disabled by default.
>
> I don't think "toggle" is good semantics for a user visible switch
> because that changes the meaning when the kernel default changes
> (which it will likely once the current default overhead is fixed)
>
> It should be rather: cgroup=on/off
>[/color]

The boot control options apply to all controllers and we want to allow
controllers to decide whether they should be turned on or off. With sufficient
documentation support in Documentation/kernel-parameters.txt, don't you think we
can expect this to work as the user intended?

--
Warm Regards,
Balbir Singh
Linux Technology Center
IBM, ISTL
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email]majordomo@vger.kernel.org[/email]
More majordomo info at [url]http://vger.kernel.org/majordomo-info.html[/url]
Please read the FAQ at [url]http://www.tux.org/lkml/[/url]

04-07-2008, 12:20 PM

unix

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

KOSAKI Motohiro wrote:[color=blue][color=green]
>> The boot control options apply to all controllers and we want to allow
>> controllers to decide whether they should be turned on or off. With sufficient
>> documentation support in Documentation/kernel-parameters.txt, don't you think we
>> can expect this to work as the user intended?[/color]
>
> 2 parameter is wrong?
>
> cgroup_disable= [KNL] Disable a particular controller
> Format: {name of the controller(s) to disable}
> cgroup_enable= [KNL] Enable a particular controller
> Format: {name of the controller(s) to enable}
>[/color]

No, it is not all bad. That can be done, but we need to guard against a usage like

cgroup_disable=memory cgroup_enable=memory

The user will probably get what he/she deserves for it.

--
Warm Regards,
Balbir Singh
Linux Technology Center
IBM, ISTL
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email]majordomo@vger.kernel.org[/email]
More majordomo info at [url]http://vger.kernel.org/majordomo-info.html[/url]
Please read the FAQ at [url]http://www.tux.org/lkml/[/url]

04-07-2008, 12:20 PM

unix

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

> The boot control options apply to all controllers and we want to allow[color=blue]
> controllers to decide whether they should be turned on or off.[/color]

Ok that's fine too (to have finer grained options), just those should
be on/off too, not toggle.
[color=blue]
> documentation support in Documentation/kernel-parameters.txt, don't you think we
> can expect this to work as the user intended?[/color]

Even with documentation support semantics changes over releases are not nice.
So "toggle" is bad, always have it absolute values.

So if an user decides they want full cgroup support and stick in a option
for .25 into their boot loader config they should always get full cgroup support in
all future kernels. Similiar if someone decides they don't need it.

-Andi
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email]majordomo@vger.kernel.org[/email]
More majordomo info at [url]http://vger.kernel.org/majordomo-info.html[/url]
Please read the FAQ at [url]http://www.tux.org/lkml/[/url]

04-07-2008, 12:20 PM

unix

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

> The boot control options apply to all controllers and we want to allow[color=blue]
> controllers to decide whether they should be turned on or off. With sufficient
> documentation support in Documentation/kernel-parameters.txt, don't you think we
> can expect this to work as the user intended?[/color]

2 parameter is wrong?

cgroup_disable= [KNL] Disable a particular controller
Format: {name of the controller(s) to disable}
cgroup_enable= [KNL] Enable a particular controller
Format: {name of the controller(s) to enable}

e.g.
user specified cgroup_enable=mem.
if default value is disable, it mean turn to enable.
if default value is enable, it is meaningless param.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email]majordomo@vger.kernel.org[/email]
More majordomo info at [url]http://vger.kernel.org/majordomo-info.html[/url]
Please read the FAQ at [url]http://www.tux.org/lkml/[/url]

toggle parameter seems no good idea.
because if change default value in the future, boot parmeter becomes
an opposite meaning.

thus, we can't change default value even if we will be able to get
enough performance improvement in the future.

Thanks
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email]majordomo@vger.kernel.org[/email]
More majordomo info at [url]http://vger.kernel.org/majordomo-info.html[/url]
Please read the FAQ at [url]http://www.tux.org/lkml/[/url]

04-07-2008, 05:50 PM

unix

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

On Mon, Apr 7, 2008 at 5:16 AM, Balbir Singh <balbir@linux.vnet.ibm.com> wrote:[color=blue]
> No, it is not all bad. That can be done, but we need to guard against a usage like
>
> cgroup_disable=memory cgroup_enable=memory
>
> The user will probably get what he/she deserves for it.[/color]

I don't think we need to guard against that. It seems perfectly valid
to have a lilo config with

append="cgroup_disable=memory"

and then want to boot with the memory controller enabled you can do

lilo -R <image> cgroup_enable=memory

The kernel command line will then look like

"... cgroup_disable=memory cgroup_enable=memory"

and the last switch should win.

Paul
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email]majordomo@vger.kernel.org[/email]
More majordomo info at [url]http://vger.kernel.org/majordomo-info.html[/url]
Please read the FAQ at [url]http://www.tux.org/lkml/[/url]