mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCHSET cgroup] extend threadgroup locking
@ 2011-09-04 18:01 Tejun Heo
  2011-09-04 18:01 ` [PATCH 1/4] cgroup: change locking order in attach_task_by_pid() Tejun Heo
                   ` (7 more replies)
  0 siblings, 8 replies; 28+ messages in thread
From: Tejun Heo @ 2011-09-04 18:01 UTC (permalink / raw)
  To: rjw, paul, lizf
  Cc: linux-pm, linux-kernel, containers, fweisbec, matthltc, akpm

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

^ permalink raw reply	[flat|nested] 28+ messages in thread

end of thread, other threads:[~2011-10-12 19:12 UTC | newest]

Thread overview: 28+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-09-04 18:01 [PATCHSET cgroup] extend threadgroup locking Tejun Heo
2011-09-04 18:01 ` [PATCH 1/4] cgroup: change locking order in attach_task_by_pid() Tejun Heo
2011-09-18 18:56   ` Oleg Nesterov
2011-10-10 17:34     ` Tejun Heo
2011-10-10 17:43       ` Tejun Heo
2011-09-04 18:01 ` [PATCH 2/4] threadgroup: rename signal->threadgroup_fork_lock to ->group_rwsem Tejun Heo
2011-09-04 18:01 ` [PATCH 3/4] threadgroup: extend threadgroup_lock() to cover exit and exec Tejun Heo
2011-09-12  4:04   ` Paul Menage
2011-09-13  7:54     ` Tejun Heo
2011-09-18 17:37   ` Oleg Nesterov
2011-09-18 18:46     ` Oleg Nesterov
2011-10-08 18:37     ` Ben Blum
2011-10-10 17:11     ` Tejun Heo
2011-10-12 17:51       ` Oleg Nesterov
2011-10-12 18:05         ` Ben Blum
2011-10-12 18:29           ` Oleg Nesterov
2011-10-12 18:44             ` Ben Blum
2011-10-12 19:07               ` Oleg Nesterov
2011-09-04 18:01 ` [PATCH 4/4] cgroup: always lock threadgroup during migration Tejun Heo
2011-09-18 17:41   ` Oleg Nesterov
2011-10-10 17:31     ` Tejun Heo
2011-09-05  4:05 ` [PATCHSET cgroup] extend threadgroup locking Rafael J. Wysocki
2011-09-05  8:43   ` Tejun Heo
2011-09-06  9:00 ` Li Zefan
2011-09-11  3:35 ` Tejun Heo
2011-09-14 18:33   ` Oleg Nesterov
2011-09-14 23:33     ` Tejun Heo
2011-09-12  4:11 ` Paul Menage

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome