lkml.org 
[lkml]   [2009]   [Feb]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH] change cpuacct usage percpu format v2
From
Dhaval Giani wrote:
> On Sat, Feb 28, 2009 at 02:25:22PM +0900, KAMEZAWA Hiroyuki wrote:
>> Dhaval Giani wrote:
>> > On Sat, Feb 28, 2009 at 09:42:17AM +0900, KAMEZAWA Hiroyuki wrote:
>> >> KAMEZAWA Hiroyuki wrote:
>> >> BTW, current interface to reset cpuacct (write ops) just reset
>> >> specified level of cpuacct and will not clear other hierarchical
>> levels.
>> >> Doesn't this behavior confuse software ?
>> >>
>> >
>> > hmmm. This got missed when we introduced hierarchy. But I wonder if it
>> > is needed?
>> >
>> IIUC, cpuacct.usage just shows sum of itself and all children's usage
>> and
>> its own usage can be calclated by reading all usage of hierarchy.
>> So, reset ops seems to be a bit broken.
>> And by this, parent's usage can be smaller than children.
>>
>
> Actually now that I think about it, it does make sense, but when I
> started implementing it, a question popped up, if we reset a child's
> counter, then the parent is going to have a much greater usage than the
> sum of the children. I wonder if this behavior is fine?
>
As far as the user remembers he did reset...

>> How about adding limitation as "you can clear usage only when there are
>> no
>> children" ? Maybe not very strange limitaton under hierarchical system.
>>
>
> Just the question I asked. Beyond that I don't think we should have such a
> limitation on reset.
>
Ok, I don't have strong requirements. I'll recomend users that you should
reset all children(hierarchy) at the same time.

Maybe no problem if we have private-usage counter....but it means one more
percpu array...

Thanks,
-Kame





\
 
 \ /
  Last update: 2009-02-28 10:39    [W:0.084 / U:0.176 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site