lkml.org 
[lkml]   [2011]   [Sep]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    From
    Subject[PATCHSET cgroup] extend threadgroup locking
    Date
    Hello,

    cgroup currently only blocks new threads from joining the target
    threadgroup during migration, and on-going migration could race
    against exec and exit leading to interesting problems - the symmetry
    between various attach methods, task exiting during method execution,
    ->exit() racing against attach methods, migrating task switching basic
    properties during exec and so on.

    This patchset extends threadgroup locking such that it covers all
    operations which can alter the threadgroup - fork, exit and exec, and
    update cgroup to take advantage of it. rwsem read ops are added to
    exit path but exec is excluded by grabbing the existing
    cred_guard_mutex from threadgroup locking helper.

    This makes threadgroup locking complete and resolves cgroup issues
    stemming from the target taskset being unstable.

    This patchset is on top of the current pm-freezer + "freezer: fixes &
    simplifications" patchset and contains the following four patches.
    Patch list and diffstat follow.

    Thanks.

    [PATCH 1/4] cgroup: change locking order in attach_task_by_pid()
    [PATCH 2/4] threadgroup: rename signal->threadgroup_fork_lock to
    [PATCH 3/4] threadgroup: extend threadgroup_lock() to cover exit and
    [PATCH 4/4] cgroup: always lock threadgroup during migration

    include/linux/init_task.h | 9 ++----
    include/linux/sched.h | 58 ++++++++++++++++++++++++++++---------------
    kernel/cgroup.c | 62 +++++++++++++++++++++-------------------------
    kernel/exit.c | 16 ++++++++---
    kernel/fork.c | 8 ++---
    5 files changed, 88 insertions(+), 65 deletions(-)

    --
    tejun

    [1] http://thread.gmane.org/gmane.linux.kernel/1187553


    \
     
     \ /
      Last update: 2011-09-04 20:03    [W:0.019 / U:62.176 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site