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] [day] [month] [year] [list]
Message-ID: <47D79CA4.5090102@openvz.org>
Date:	Wed, 12 Mar 2008 12:04:36 +0300
From:	Pavel Emelyanov <xemul@...nvz.org>
To:	Andrew Morton <akpm@...ux-foundation.org>
CC:	Balbir Singh <balbir@...ux.vnet.ibm.com>,
	KAMEZAWA Hiroyuki <kamezawa.hiroyu@...fujitsu.com>,
	Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] Add the max_usage member on the res_counter

Andrew Morton wrote:
> On Tue, 11 Mar 2008 17:55:46 +0300 Pavel Emelyanov <xemul@...nvz.org> wrote:
> 
>> This field is the maximal value of the usage one since the counter
>> creation (or since the latest reset).
>>
>> To reset this to the usage value simply write anything to the
>> appropriate cgroup file.
> 
> What is the justification for making this change?  Why do we need it? 

The max_usage value is useful when gathering a statistical information
about the particular group, as it shows the actual memory requirements 
for a particular group, not just some usage snapshot.

E.g. this value can be used to quickly tune the group. OpenVZ users often
set the limits to maximal values and either load the container with a common
patterns or leave one for a while. After this the max_usage value shows the 
amount of memory the container would require during its common activity. 
Setting the limit a bit above this value gives a pretty good configuration, 
that works in the most cases.

But, please see my second comment.

> Please provide this information for all patches where it is not obvious.
> 
>>  	{
>> +		.name = "max_usage_in_bytes",
>> +		.private = RES_MAX_USAGE,
>> +		.write = mem_cgroup_max_reset,
>> +		.read_u64 = mem_cgroup_read,
>> +	},
> 
> Documentation/controllers/memory.txt needs updating.
> 

I'm preparing the Documentation/controllers/resource_counter.txt file
that will describe this abstraction. Since this one can be used for
many other resources (swap, kernel memory, networking, etc) this will
also eliminate all the possible future duplications in the appropriate
docs.

The above explanation of the max_usage attribute will be included in
this doc. Should it still be included in the previous patch's comment or
in the patch _as_a_ comment?
--
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