lkml.org 
[lkml]   [2011]   [Oct]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 05/10] Make total_forks per-cgroup
On Wed, Oct 12, 2011 at 05:03:52PM +0400, Glauber Costa wrote:
> On 10/12/2011 05:03 PM, Frederic Weisbecker wrote:
> >On Wed, Oct 12, 2011 at 04:59:07PM +0400, Glauber Costa wrote:
> >>On 10/12/2011 04:59 PM, Frederic Weisbecker wrote:
> >>>On Wed, Oct 12, 2011 at 11:35:50AM +0400, Glauber Costa wrote:
> >>>>On 10/12/2011 03:45 AM, Frederic Weisbecker wrote:
> >>>Is your counting propagated to the parents in a hierarchy?
> >>>For example if A is parent cgroup of B and C, does A account the
> >>>forks happening in B and C?
> >>
> >>Yes.
> >
> >But only to the first parent or also all ancestors?
> it keeps going until it reaches the root task group.

Using the task counter subsystem for that would involve
a bit more complications like adding a new counter on it
that would need to be incremented in parallel but differently.
You would also need to bind this subsystem anytime you
want this statistic.

I don't think it's worth doing this. You would also get the
overhead in the exit path because the subsystem also uncharge
one of its counters across the whole hierarchy.

OTOH, it's scary to see that new feature will walk
the entire hierarchy on every fork when CONFIG_CGROUP_SCHED=y
And I guess that today this config is easily selected by
distros.

IIUC that walk also happen on every timer interrupt for
the user/system/idle cpu time accounting?

May be this should reside in a seperate config, so that those
that don't care about the per cgroup stats avoid that
overhead?


\
 
 \ /
  Last update: 2011-10-12 16:05    [W:0.034 / U:2.192 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site