lkml.org 
[lkml]   [2010]   [Jun]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
Subject[RFC] [PATCH v3 0/2] cgroups: implement moving a threadgroup's threads atomically with cgroup.procs
This patch series is a revision of http://lkml.org/lkml/2010/5/29/126 .

These patches use an rwlock in signal_struct which access is dependent
on Oleg's recent changes to signal_struct's lifetime rules.

It is okay to write the tid of any task in the threadgroup. This is
implemented by taking task->group_leader right after find_task_by_vpid
while still rcu_read-side. This makes it necessary to check if
thread_group_leader(leader) every time we want to iterate over
->thread_group; each of these checks can fail with -EAGAIN.
Unfortunately this also means I needed to put these checks in can_attach
for each subsystem that needs to check each thread in the group.

I handle EAGAIN in the file's write handler, since hey, it's a super
expensive operation, might as well make it unbounded-time to boot - this
is optional and would work just as well with -EAGAIN sent to userspace.

-- bblum

---
Documentation/cgroups/cgroups.txt | 13 -
include/linux/cgroup.h | 15 -
include/linux/init_task.h | 9
include/linux/sched.h | 10
kernel/cgroup.c | 449 +++++++++++++++++++++++++++++++++-----
kernel/cgroup_freezer.c | 4
kernel/cpuset.c | 4
kernel/fork.c | 10
kernel/ns_cgroup.c | 4
kernel/sched.c | 4
10 files changed, 462 insertions(+), 60 deletions(-)


\
 
 \ /
  Last update: 2010-06-25 07:49    [W:0.024 / U:0.148 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site