lkml.org 
[lkml]   [2011]   [Oct]   [11]   [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 05, 2011 at 04:12:00PM +0400, Glauber Costa wrote:
> On 10/05/2011 01:05 PM, Peter Zijlstra wrote:
> >On Sun, 2011-10-02 at 23:21 +0400, Glauber Costa wrote:
> >>This patch counts the total number of forks per-cgroup.
> >>The information is propagated to the parent, so the total
> >>number of forks in the system, is the parent cgroup's one.
> >>
> >>To achieve that, total_forks is made per-cpu. There is no
> >>particular reason to do that, but by doing this, we are
> >>able to bundle it inside the cpustat structure already
> >>present.
> >
> >I think fweisbec is also doing something with forks and cgroups.
>
> I am all ears...
>
> Frederic, does it conflict with what you're doing ?

I don't know if that really conflicts but I'm working
on a cgroup subsystem that is able to control the number
of tasks running in a subsystem.

It consists in two new files added:

* tasks.usage
* tasks.limit

The subsystem rejects any new fork or migration into the
cgroup when tasks.usage > tasks.limit

So tasks.usage can inform you about the number of tasks
running into the cgroup. It's not strictly the number
of forks because it also counts the tasks that have been
attached to the cgroup.

But something like a tasks.fork file could be implemented
in that subsystem as well.

It depends on what you need.


\
 
 \ /
  Last update: 2011-10-12 01:49    [W:0.073 / U:8.880 seconds]
©2003-2017 Jasper Spaans. hosted at Digital OceanAdvertise on this site