lkml.org 
[lkml]   [2011]   [Aug]   [31]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [RFD] Task counter: cgroup core feature or cgroup subsystem? (was Re: [PATCH 0/8 v3] cgroups: Task counter subsystem)
    On Fri, Aug 26, 2011 at 08:16:32AM -0700, Paul Menage wrote:
    > On Wed, Aug 24, 2011 at 10:54 AM, Frederic Weisbecker
    > <fweisbec@gmail.com> wrote:
    > >
    > > It seems your patch doesn't handle the ->fork() and ->exit() calls.
    > > We probably need a quick access to states of multi-subsystems from
    > > the task, some lists available from task->cgroups, I don't know yet.
    > >
    >
    > That state is available, but currently only while holding cgroup_mutex
    > - at least, that's what task_cgroup_from_root() requires.
    >
    > It might be the case that we could achieve the same effect by just
    > locking the task, so the pre-condition for task_cgroup_from_root()
    > would be either that cgroup_mutex is held or the task lock is held.

    Now I realize, is it necessary if we only want to access a subsys state
    through task->cgroups->subsys[i] from the ->fork() callback?

    The task is not yet added to the thread_group, its pid is not yet
    hashed so I guess it can not concurrently be moved to another
    cgroup.

    We need a special flavour of task->cgroups->subsys for multi bindable
    subsystem but that's the same.


    \
     
     \ /
      Last update: 2011-08-31 23:57    [W:5.209 / U:0.880 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site