lkml.org 
[lkml]   [2008]   [Oct]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] Add hierarchical accounting to cpu accounting controller
On Mon, Oct 27, 2008 at 10:13 AM, Bharata B Rao
<bharata@linux.vnet.ibm.com> wrote:
> On Mon, Oct 27, 2008 at 10:17:03AM +0900, KAMEZAWA Hiroyuki wrote:
>> On Sat, 25 Oct 2008 08:38:52 -0700
>> "Paul Menage" <menage@google.com> wrote:
>>
>> > On Fri, Oct 24, 2008 at 11:01 PM, Bharata B Rao
>> > <bharata@linux.vnet.ibm.com> wrote:
>> > >
>> > > Reported-by: Srivatsa Vaddagiri <vatsa@linux.vnet.ibm.com>
>> > > Signed-off-by: Bharata B Rao <bharata@linux.vnet.ibm.com>
>> >
>> > Reviewed-by: Paul Menage <menage@google.com>
>
> Thanks Paul.
>
>> >
>> > So in technical terms this patch looks fine now. There's still the
>> > question of whether it's OK to change the existing API, since it's
>> > been in the kernel in its currently (non-hierarchical) form for
>> > several releases now.
>
> Hmm... Can we consider this as an API change ? Currently cpuacct.usage
> readers of a parent accounting group are missing the usage contributions
> from its children groups. I would consider this patch as fixing the
> above problem by correctly reflecting the cpu usage for every accounting
> group.
>

If a particular application desires to derive the usage of its
immediate tasks and does not care about subcgroups, it is a simple
iteration (after this fix)

cpuacct - sigma(cpuacct_child)

and currently if we cared about child accounting, we could do

cpuacct + recursively(sigma(cpuacct_child))

In that sense this fix makes more sense, but like Paul said we need to
figure out if it is an API change. My take is that it is a BUG fix,
since we do care about child subgroups in accounting.


>> >
>> Hmm..how about having 2 params as "aggregated usage" and "private usage" ?
>>
>> cpuacct.usage.
>> cpuacct.all_subtree_usage.
>
> Is there really a need to differentiate between aggregated and private
> usage other than to maintain the current behaviour ?
>

That might be useful to have, but as above it can always be derived.

Balbir


\
 
 \ /
  Last update: 2008-10-27 08:01    [W:0.048 / U:0.644 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site