lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <47C2F86A.9010709@linux.vnet.ibm.com>
Date:	Mon, 25 Feb 2008 22:48:34 +0530
From:	Balbir Singh <balbir@...ux.vnet.ibm.com>
To:	Paul Menage <menage@...gle.com>
CC:	Andrew Morton <akpm@...ux-foundation.org>,
	Hugh Dickins <hugh@...itas.com>,
	Sudhir Kumar <skumar@...ux.vnet.ibm.com>,
	YAMAMOTO Takashi <yamamoto@...inux.co.jp>, lizf@...fujitsu.com,
	linux-kernel@...r.kernel.org, taka@...inux.co.jp,
	linux-mm@...ck.org, David Rientjes <rientjes@...gle.com>,
	Pavel Emelianov <xemul@...nvz.org>,
	KAMEZAWA Hiroyuki <kamezawa.hiroyu@...fujitsu.com>
Subject: Re: [PATCH] Memory Resource Controller Add Boot Option

Paul Menage wrote:
> On Mon, Feb 25, 2008 at 3:55 AM, Balbir Singh <balbir@...ux.vnet.ibm.com> wrote:
>>
>>  A boot option for the memory controller was discussed on lkml. It is a good
>>  idea to add it, since it saves memory for people who want to turn off the
>>  memory controller.
>>
>>  By default the option is on for the following two reasons
>>
>>  1. It provides compatibility with the current scheme where the memory
>>    controller turns on if the config option is enabled
>>  2. It allows for wider testing of the memory controller, once the config
>>    option is enabled
>>
>>  We still allow the create, destroy callbacks to succeed, since they are
>>  not aware of boot options. We do not populate the directory will
>>  memory resource controller specific files.
> 
> Would it make more sense to have a generic cgroups boot option for this?
> 
> Something like cgroup_disable=xxx, which would be parsed by cgroups
> and would cause:
> 
> - a "disabled" flag to be set to true in the subsys object (you could
> use this in place of the mem_cgroup_on flag)
> 

I thought about it, but it did not work out all that well. The reason being,
that the memory controller is called in from places besides cgroup.
mem_cgroup_charge_common() for example is called from several places in mm.
Calling into cgroups to check, enabled/disabled did not seem right.

Hence I put the boot option in mm/memcontrol.c

> - prevent the disabled cgroup from being bound to any mounted
> hierarchy (so it would be ignored in a mount with no subsystem
> options, and a mount with options that specifically pick that
> subsystem would give an error)
> 

The controller can be bound, but I just don't populate the files associated with
the controller

> Paul


-- 
	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 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

Powered by Openwall GNU/*/Linux Powered by OpenVZ