mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Paul Menage <menage@google.com>
To: akpm@linux-foundation.org, bblum@andrew.cmu.edu, lizf@cn.fujitsu.com
Cc: linux-kernel@vger.kernel.org, containers@lists.linux-foundation.org
Subject: [PATCH 0/8] CGroups: cgroup memberlist enhancements/fixes
Date: Tue, 18 Aug 2009 16:58:06 -0700	[thread overview]
Message-ID: <20090818235059.22531.42618.stgit@menage.mtv.corp.google.com> (raw)

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(-)


             reply	other threads:[~2009-08-18 23:58 UTC|newest]

Thread overview: 37+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-08-18 23:58 Paul Menage [this message]
2009-08-18 23:58 ` [PATCH 1/8] Revert commit 8827c288feb7810185aa7c2e37537202fc709869 Paul Menage
2009-08-20  2:34   ` Li Zefan
2009-08-20  2:41     ` Paul Menage
2009-08-20  3:11       ` Li Zefan
2009-08-20  3:13         ` Paul Menage
2009-08-20  3:17           ` Li Zefan
2009-08-20  4:40           ` Matt Helsley
2009-08-20  4:49             ` Paul Menage
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-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 ` [PATCH 4/8] Use vmalloc for large cgroups pidlist allocations Paul Menage
2009-08-20  2:37   ` Li Zefan
2009-08-20  2:41     ` Paul Menage
2009-08-20  2:54       ` Li Zefan
2009-08-20  3:04         ` Paul Menage
2009-08-20 21:14   ` Andrew Morton
2009-08-20 22:35     ` Jonathan Corbet
2009-08-20 22:56       ` David Rientjes
2009-08-21  0:53         ` Li Zefan
2009-08-18 23:58 ` [PATCH 5/8] Changes css_set freeing mechanism to be under RCU Paul Menage
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-20  3:06   ` Li Zefan
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-20  2:39   ` Li Zefan
2009-08-20  2:45     ` Paul Menage
2009-08-20 21:13       ` Andrew Morton
2009-08-20 21:16         ` Paul Menage
2009-08-21  4:24         ` Ben Blum
2009-08-21  4:50           ` Andrew Morton
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-20  3:00   ` Li Zefan

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20090818235059.22531.42618.stgit@menage.mtv.corp.google.com \
    --to=menage@google.com \
    --cc=akpm@linux-foundation.org \
    --cc=bblum@andrew.cmu.edu \
    --cc=containers@lists.linux-foundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lizf@cn.fujitsu.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®