All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/8] CGroups: cgroup memberlist enhancements/fixes
@ 2009-08-18 23:58 ` Paul Menage
  0 siblings, 0 replies; 74+ messages in thread
From: Paul Menage @ 2009-08-18 23:58 UTC (permalink / raw)
  To: akpm-de/tnXTf+JLsfHDXvbKv3WD2FQJk+8+b,
	bblum-OM76b2Iv3yLQjUSlxSEPGw, lizf-BthXqXjhjHXQFUHtdCDX3A
  Cc: containers-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA

The following series adds a "cgroup.procs" file to each cgroup that
reports unique tgids rather than pids, and allows all threads in a
threadgroup to be atomically moved to a new cgroup.

The subsystem "attach" interface is modified to support attaching
whole threadgroups at a time, which could introduce potential problems
if any subsystem were to need to access the old cgroup of every thread
being moved. The attach interface may need to be revised if this
becomes the case.

Also added is functionality for read/write locking all CLONE_THREAD
fork()ing within a threadgroup, by means of an rwsem that lives in the
sighand_struct, for per-threadgroup-ness and also for sharing a
cacheline with the sighand's atomic count. This scheme should
introduce no extra overhead in the fork path when there's no
contention.

The final patch reveals potential for a race when forking before a
subsystem's attach function is called - one potential solution in case
any subsystem has this problem is to hang on to the group's fork mutex
through the attach() calls, though no subsystem yet demonstrates need
for an extended critical section.

---

Ben Blum (7):
      Adds ability to move all threads in a process to a new cgroup atomically
      Adds functionality to read/write lock CLONE_THREAD fork()ing per-threadgroup
      Lets ss->can_attach and ss->attach do whole threadgroups at a time
      Changes css_set freeing mechanism to be under RCU
      Use vmalloc for large cgroups pidlist allocations
      Ensures correct concurrent opening/reading of pidlists across pid namespaces
      Adds a read-only "procs" file similar to "tasks" that shows only unique tgids

Paul Menage (1):
      Revert commit 8827c288feb7810185aa7c2e37537202fc709869


 Documentation/cgroups/cgroups.txt |   25 +
 include/linux/cgroup.h            |   67 ++-
 include/linux/init_task.h         |    9 
 include/linux/sched.h             |   15 +
 kernel/cgroup.c                   |  948 +++++++++++++++++++++++++++++--------
 kernel/cgroup_freezer.c           |   15 +
 kernel/cpuset.c                   |   66 ++-
 kernel/fork.c                     |    9 
 kernel/ns_cgroup.c                |   16 +
 kernel/sched.c                    |   35 +
 mm/memcontrol.c                   |    3 
 security/device_cgroup.c          |    3 
 12 files changed, 974 insertions(+), 237 deletions(-)

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

end of thread, other threads:[~2009-08-21  4:58 UTC | newest]

Thread overview: 74+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-08-18 23:58 [PATCH 0/8] CGroups: cgroup memberlist enhancements/fixes Paul Menage
2009-08-18 23:58 ` Paul Menage
     [not found] ` <20090818235059.22531.42618.stgit-u3IScbYxn0zHt/MElyovVYaSKrA+ACpX0E9HWUfgJXw@public.gmane.org>
2009-08-18 23:58   ` [PATCH 1/8] Revert commit 8827c288feb7810185aa7c2e37537202fc709869 Paul Menage
2009-08-18 23:58     ` Paul Menage
     [not found]     ` <20090818235812.22531.76212.stgit-u3IScbYxn0zHt/MElyovVYaSKrA+ACpX0E9HWUfgJXw@public.gmane.org>
2009-08-20  2:34       ` Li Zefan
2009-08-20  2:34         ` Li Zefan
     [not found]         ` <4A8CB62F.8030504-BthXqXjhjHXQFUHtdCDX3A@public.gmane.org>
2009-08-20  2:41           ` Paul Menage
2009-08-20  2:41         ` Paul Menage
     [not found]           ` <6599ad830908191941x6ee47d58x295c29f80f8c624c-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2009-08-20  3:11             ` Li Zefan
2009-08-20  3:11           ` Li Zefan
2009-08-20  3:13             ` Paul Menage
2009-08-20  3:17               ` Li Zefan
     [not found]               ` <6599ad830908192013p328a2256o8c807a160e25a9a3-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2009-08-20  3:17                 ` Li Zefan
2009-08-20  4:40                 ` Matt Helsley
2009-08-20  4:40               ` Matt Helsley
     [not found]                 ` <20090820044059.GE29801-52DBMbEzqgQ/wnmkkaCWp/UQ3DHhIser@public.gmane.org>
2009-08-20  4:49                   ` Paul Menage
2009-08-20  4:49                 ` Paul Menage
     [not found]             ` <4A8CBEDC.6010709-BthXqXjhjHXQFUHtdCDX3A@public.gmane.org>
2009-08-20  3:13               ` Paul Menage
2009-08-20 21:13       ` Andrew Morton
2009-08-20 21:13     ` Andrew Morton
2009-08-18 23:58   ` [PATCH 2/8] Adds a read-only "procs" file similar to "tasks" that shows only unique tgids Paul Menage
2009-08-18 23:58     ` Paul Menage
     [not found]     ` <20090818235817.22531.23434.stgit-u3IScbYxn0zHt/MElyovVYaSKrA+ACpX0E9HWUfgJXw@public.gmane.org>
2009-08-20  2:34       ` Li Zefan
2009-08-20  2:34         ` Li Zefan
2009-08-18 23:58   ` [PATCH 3/8] Ensures correct concurrent opening/reading of pidlists across pid namespaces Paul Menage
2009-08-18 23:58     ` Paul Menage
2009-08-18 23:58   ` [PATCH 4/8] Use vmalloc for large cgroups pidlist allocations Paul Menage
2009-08-18 23:58     ` Paul Menage
2009-08-20  2:37     ` Li Zefan
2009-08-20  2:41       ` Paul Menage
     [not found]         ` <6599ad830908191941g77db4e69ve46bc8623f77d97f-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2009-08-20  2:54           ` Li Zefan
2009-08-20  2:54         ` Li Zefan
     [not found]           ` <4A8CBAE1.9010408-BthXqXjhjHXQFUHtdCDX3A@public.gmane.org>
2009-08-20  3:04             ` Paul Menage
2009-08-20  3:04           ` Paul Menage
     [not found]       ` <4A8CB6F0.1020308-BthXqXjhjHXQFUHtdCDX3A@public.gmane.org>
2009-08-20  2:41         ` Paul Menage
     [not found]     ` <20090818235827.22531.60306.stgit-u3IScbYxn0zHt/MElyovVYaSKrA+ACpX0E9HWUfgJXw@public.gmane.org>
2009-08-20  2:37       ` Li Zefan
2009-08-20 21:14       ` Andrew Morton
2009-08-20 21:14         ` Andrew Morton
2009-08-20 22:35         ` Jonathan Corbet
2009-08-20 22:56           ` David Rientjes
     [not found]             ` <alpine.DEB.2.00.0908201542440.29906-X6Q0R45D7oAcqpCFd4KODRPsWskHk0ljAL8bYrjMMd8@public.gmane.org>
2009-08-21  0:53               ` Li Zefan
2009-08-21  0:53             ` Li Zefan
     [not found]           ` <20090820163510.27942b62-vw3g6Xz/EtPk1uMJSBkQmQ@public.gmane.org>
2009-08-20 22:56             ` David Rientjes
     [not found]         ` <20090820141400.f6d3d5a6.akpm-de/tnXTf+JLsfHDXvbKv3WD2FQJk+8+b@public.gmane.org>
2009-08-20 22:35           ` Jonathan Corbet
2009-08-18 23:58   ` [PATCH 5/8] Changes css_set freeing mechanism to be under RCU Paul Menage
2009-08-18 23:58     ` Paul Menage
2009-08-20  2:38     ` Li Zefan
     [not found]     ` <20090818235832.22531.96610.stgit-u3IScbYxn0zHt/MElyovVYaSKrA+ACpX0E9HWUfgJXw@public.gmane.org>
2009-08-20  2:38       ` Li Zefan
2009-08-18 23:58   ` [PATCH 6/8] Lets ss->can_attach and ss->attach do whole threadgroups at a time Paul Menage
2009-08-18 23:58     ` Paul Menage
2009-08-20  3:06     ` Li Zefan
     [not found]     ` <20090818235837.22531.86001.stgit-u3IScbYxn0zHt/MElyovVYaSKrA+ACpX0E9HWUfgJXw@public.gmane.org>
2009-08-20  3:06       ` Li Zefan
2009-08-20  4:38       ` Matt Helsley
2009-08-20  4:38     ` Matt Helsley
2009-08-18 23:58   ` [PATCH 7/8] Adds functionality to read/write lock CLONE_THREAD fork()ing per-threadgroup Paul Menage
2009-08-18 23:58     ` Paul Menage
     [not found]     ` <20090818235843.22531.57310.stgit-u3IScbYxn0zHt/MElyovVYaSKrA+ACpX0E9HWUfgJXw@public.gmane.org>
2009-08-20  2:39       ` Li Zefan
2009-08-20  2:39     ` Li Zefan
     [not found]       ` <4A8CB750.7040509-BthXqXjhjHXQFUHtdCDX3A@public.gmane.org>
2009-08-20  2:45         ` Paul Menage
2009-08-20  2:45       ` Paul Menage
     [not found]         ` <6599ad830908191945k7c5f86b6j3ea4194f0dffa9ce-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2009-08-20 21:13           ` Andrew Morton
2009-08-20 21:13         ` Andrew Morton
2009-08-20 21:16           ` Paul Menage
     [not found]           ` <20090820141356.1bec84ed.akpm-de/tnXTf+JLsfHDXvbKv3WD2FQJk+8+b@public.gmane.org>
2009-08-20 21:16             ` Paul Menage
2009-08-21  4:24             ` Ben Blum
2009-08-21  4:24               ` Ben Blum
     [not found]               ` <20090821042403.GA25865-OM76b2Iv3yLQjUSlxSEPGw@public.gmane.org>
2009-08-21  4:50                 ` Andrew Morton
2009-08-21  4:50                   ` Andrew Morton
     [not found]                   ` <20090820215007.0e774abb.akpm-de/tnXTf+JLsfHDXvbKv3WD2FQJk+8+b@public.gmane.org>
2009-08-21  4:58                     ` Paul Menage
2009-08-21  4:58                   ` Paul Menage
2009-08-18 23:58   ` [PATCH 8/8] Adds ability to move all threads in a process to a new cgroup atomically Paul Menage
2009-08-18 23:58     ` Paul Menage
     [not found]     ` <20090818235848.22531.152.stgit-u3IScbYxn0zHt/MElyovVYaSKrA+ACpX0E9HWUfgJXw@public.gmane.org>
2009-08-20  3:00       ` Li Zefan
2009-08-20  3:00     ` Li Zefan

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.