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


\
 
 \ /
  Last update: 2008-03-12 10:07    [W:0.127 / U:0.956 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site