All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCHSET] cgroup: introduce cgroup_taskset and consolidate subsys methods, take#2
@ 2011-08-25 22:43 Tejun Heo
  2011-08-25 22:43 ` [PATCH 1/6] cgroup: subsys->attach_task() should be called after migration Tejun Heo
                   ` (16 more replies)
  0 siblings, 17 replies; 106+ messages in thread
From: Tejun Heo @ 2011-08-25 22:43 UTC (permalink / raw)
  To: rjw, paul, lizf
  Cc: linux-pm, linux-kernel, containers, fweisbec, matthltc, kamezawa.hiroyu

Hello,

This is the second take of cgroup_taskset patchset.  This patchset
introduces cgroup_taskset along with some accessors and iterator,
updates methods to use it, consolidates usages and drops superflous
methods.  For more info, please read the head message and discussions
from the last take[L].

Changes from the last take[L] are mostly minor.

* Acked-by's added
* patch contamination fixed
* local variable renamed
* documentation updated

It contains the following six patches.

 0001-cgroup-subsys-attach_task-should-be-called-after-mig.patch
 0002-cgroup-improve-old-cgroup-handling-in-cgroup_attach_.patch
 0003-cgroup-introduce-cgroup_taskset-and-use-it-in-subsys.patch
 0004-cgroup-don-t-use-subsys-can_attach_task-or-attach_ta.patch
 0005-cgroup-cpuset-don-t-use-ss-pre_attach.patch
 0006-cgroup-kill-subsys-can_attach_task-pre_attach-and-at.patch

and is based on the current linux-pm/pm-freezer (7b5b95b3f5 "freezer:
remove should_send_signal() and update frozen()"), and available in
the following git tree.

 git://git.kernel.org/pub/scm/linux/kernel/git/tj/misc.git freezer

Any ideas on how to route these patches?  If we float these in -mm,
further freezer patches would have to be in -mm too which in turn will
force job control patches depending on them to -mm too.  It would be
really nice if we can find a stable git branch to host these.  Routing
through pm-freezer might not be such a bad idea either, I think.

Thank you.

 Documentation/cgroups/cgroups.txt |   51 +++------
 block/blk-cgroup.c                |   45 +++++---
 include/linux/cgroup.h            |   31 ++++-
 kernel/cgroup.c                   |  200 ++++++++++++++++++++++++--------------
 kernel/cgroup_freezer.c           |   16 ---
 kernel/cpuset.c                   |  105 +++++++++----------
 kernel/events/core.c              |   13 +-
 kernel/sched.c                    |   31 +++--
 mm/memcontrol.c                   |   16 +--
 security/device_cgroup.c          |    7 -
 10 files changed, 294 insertions(+), 221 deletions(-)

--
tejun

[L] http://thread.gmane.org/gmane.linux.kernel/1183130

^ permalink raw reply	[flat|nested] 106+ messages in thread
* [PATCHSET] cgroup: introduce cgroup_taskset and consolidate subsys methods
@ 2011-08-23 22:19 Tejun Heo
  2011-08-23 22:19 ` [PATCH 3/6] cgroup: introduce cgroup_taskset and use it in subsys->can_attach(), cancel_attach() and attach() Tejun Heo
                   ` (2 more replies)
  0 siblings, 3 replies; 106+ messages in thread
From: Tejun Heo @ 2011-08-23 22:19 UTC (permalink / raw)
  To: rjw, paul, lizf; +Cc: linux-pm, linux-kernel, containers

Hello,

cgroup has grown quite some number of subsys methods.  Some of them
are overlapping, inconsistent with each other and called under
different conditions depending on whether they're called for a single
task or whole process.  Unfortunately, these callbacks are complicated
and incomplete at the same time.

* ->attach_task() is called after migration for task attach but before
  for process.

* Ditto for ->pre_attach().

* ->can_attach_task() is called for every task in the thread group but
  ->attach_task() skips the ones which don't actually change cgroups.

* Task attach becomes noop if the task isn't actually moving.  Process
  attach is always performed.

* ->attach_task() doesn't (or at least aren't supposed to) have access
  to the old cgroup.

* During cancel, there's no way to access the affected tasks.

This patchset introduces cgroup_taskset along with some accessors and
iterator, updates methods to use it, consolidates usages and drops
superflous methods.

It contains the following six patches.

 0001-cgroup-subsys-attach_task-should-be-called-after-mig.patch
 0002-cgroup-improve-old-cgroup-handling-in-cgroup_attach_.patch
 0003-cgroup-introduce-cgroup_taskset-and-use-it-in-subsys.patch
 0004-cgroup-don-t-use-subsys-can_attach_task-or-attach_ta.patch
 0005-cgroup-cpuset-don-t-use-ss-pre_attach.patch
 0006-cgroup-kill-subsys-can_attach_task-pre_attach-and-at.patch

and is based on the current linux-pm/pm-freezer (7b5b95b3f5 "freezer:
remove should_send_signal() and update frozen()"), and available in
the following git tree.

 git://git.kernel.org/pub/scm/linux/kernel/git/tj/misc.git freezer

I based this on top of pm-freezer because cgroup_freezer changes
conflict (easy to resolve but still) and I'm planning on making
further changes to cgroup_freezer which will depend on both freezer
and cgroup changes.  How should we route these changes?

1. As this patchset would affect other cgroup changes, it makes sense
   to route these through the cgroup branch (BTW, where is it?) and
   propagate things there.  In that case, I'll re-spin the patches on
   top of that tree and send a pull request for the merged branch to
   Rafael.

2. Alternatively, if cgroup isn't expected to have too extensive
   changes in this cycle, we can just funnel all these through
   Rafael's tree.

3. Yet another choice would be applying these on Rafael's tree and
   then pull that into cgroup tree as further changes aren't gonna
   affect cgroup all that much.

What do you guys think?

Thank you.

 Documentation/cgroups/cgroups.txt |   46 +++-----
 block/blk-cgroup.c                |   45 +++++---
 include/linux/cgroup.h            |   31 ++++-
 kernel/cgroup.c                   |  200 ++++++++++++++++++++++++--------------
 kernel/cgroup_freezer.c           |   16 ---
 kernel/cpuset.c                   |  105 +++++++++----------
 kernel/events/core.c              |   13 +-
 kernel/sched.c                    |   31 +++--
 mm/memcontrol.c                   |   16 +--
 security/device_cgroup.c          |    7 -
 10 files changed, 289 insertions(+), 221 deletions(-)

--
tejun

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

end of thread, other threads:[~2011-09-01 12:58 UTC | newest]

Thread overview: 106+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-08-25 22:43 [PATCHSET] cgroup: introduce cgroup_taskset and consolidate subsys methods, take#2 Tejun Heo
2011-08-25 22:43 ` [PATCH 1/6] cgroup: subsys->attach_task() should be called after migration Tejun Heo
2011-08-25 22:43 ` Tejun Heo
2011-08-26  4:12   ` KAMEZAWA Hiroyuki
2011-08-26  4:12   ` KAMEZAWA Hiroyuki
     [not found]   ` <1314312192-26885-2-git-send-email-tj-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
2011-08-26  4:12     ` KAMEZAWA Hiroyuki
2011-08-25 22:43 ` [PATCH 2/6] cgroup: improve old cgroup handling in cgroup_attach_proc() Tejun Heo
2011-08-26  4:13   ` KAMEZAWA Hiroyuki
     [not found]   ` <1314312192-26885-3-git-send-email-tj-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
2011-08-26  4:13     ` KAMEZAWA Hiroyuki
2011-08-26  4:13   ` KAMEZAWA Hiroyuki
2011-08-25 22:43 ` Tejun Heo
2011-08-25 22:43 ` [PATCH 3/6] cgroup: introduce cgroup_taskset and use it in subsys->can_attach(), cancel_attach() and attach() Tejun Heo
2011-08-26  2:38   ` Matt Helsley
     [not found]   ` <1314312192-26885-4-git-send-email-tj-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
2011-08-26  2:38     ` Matt Helsley
2011-08-26  4:16     ` KAMEZAWA Hiroyuki
2011-08-26  2:38   ` Matt Helsley
2011-08-26  2:48     ` Matt Helsley
2011-08-26  2:48     ` Matt Helsley
2011-08-26  6:40     ` Tejun Heo
     [not found]     ` <20110826023818.GC3457-52DBMbEzqgQ/wnmkkaCWp/UQ3DHhIser@public.gmane.org>
2011-08-26  2:48       ` Matt Helsley
2011-08-26  6:40       ` Tejun Heo
2011-08-26 15:54       ` Paul Menage
2011-08-26  6:40     ` Tejun Heo
2011-08-26 15:54     ` Paul Menage
2011-08-26 15:54     ` Paul Menage
2011-08-26  4:16   ` KAMEZAWA Hiroyuki
2011-08-26  4:16   ` KAMEZAWA Hiroyuki
2011-08-25 22:43 ` Tejun Heo
2011-08-25 22:43 ` [PATCH 4/6] cgroup: don't use subsys->can_attach_task() or ->attach_task() Tejun Heo
2011-08-25 22:43 ` Tejun Heo
     [not found]   ` <1314312192-26885-5-git-send-email-tj-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
2011-08-26  4:18     ` KAMEZAWA Hiroyuki
2011-08-26  4:18   ` KAMEZAWA Hiroyuki
2011-08-26  4:18   ` KAMEZAWA Hiroyuki
2011-08-25 22:43 ` [PATCH 5/6] cgroup, cpuset: don't use ss->pre_attach() Tejun Heo
2011-08-25 22:43 ` Tejun Heo
     [not found]   ` <1314312192-26885-6-git-send-email-tj-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
2011-08-26  4:19     ` KAMEZAWA Hiroyuki
2011-08-26  4:19   ` KAMEZAWA Hiroyuki
2011-08-26  4:19   ` KAMEZAWA Hiroyuki
2011-08-25 22:43 ` [PATCH 6/6] cgroup: kill subsys->can_attach_task(), pre_attach() and attach_task() Tejun Heo
2011-08-26  4:20   ` KAMEZAWA Hiroyuki
2011-08-26  4:20   ` KAMEZAWA Hiroyuki
2011-08-30 20:10   ` Frederic Weisbecker
2011-08-31  7:03     ` Tejun Heo
2011-08-31 13:42       ` Frederic Weisbecker
2011-08-31 13:42       ` Frederic Weisbecker
2011-09-01 11:22         ` Tejun Heo
2011-09-01 11:22         ` Tejun Heo
2011-09-01 11:22         ` Tejun Heo
     [not found]           ` <20110901112221.GA2752-Gd/HAXX7CRxy/B6EtB590w@public.gmane.org>
2011-09-01 12:58             ` Frederic Weisbecker
2011-09-01 12:58           ` Frederic Weisbecker
2011-09-01 12:58           ` Frederic Weisbecker
     [not found]       ` <20110831070313.GA29179-9pTldWuhBndy/B6EtB590w@public.gmane.org>
2011-08-31 13:42         ` Frederic Weisbecker
     [not found]     ` <20110830201030.GC15953-oHC15RC7JGTpAmv0O++HtFaTQe2KTcn/@public.gmane.org>
2011-08-31  7:03       ` Tejun Heo
2011-08-31  7:03     ` Tejun Heo
     [not found]   ` <1314312192-26885-7-git-send-email-tj-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
2011-08-26  4:20     ` KAMEZAWA Hiroyuki
2011-08-30 20:10     ` Frederic Weisbecker
2011-08-30 20:10   ` Frederic Weisbecker
2011-08-25 22:43 ` Tejun Heo
     [not found] ` <1314312192-26885-1-git-send-email-tj-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
2011-08-25 22:43   ` [PATCH 1/6] cgroup: subsys->attach_task() should be called after migration Tejun Heo
2011-08-25 22:43   ` [PATCH 2/6] cgroup: improve old cgroup handling in cgroup_attach_proc() Tejun Heo
2011-08-25 22:43   ` [PATCH 3/6] cgroup: introduce cgroup_taskset and use it in subsys->can_attach(), cancel_attach() and attach() Tejun Heo
2011-08-25 22:43   ` [PATCH 4/6] cgroup: don't use subsys->can_attach_task() or ->attach_task() Tejun Heo
2011-08-25 22:43   ` [PATCH 5/6] cgroup, cpuset: don't use ss->pre_attach() Tejun Heo
2011-08-25 22:43   ` [PATCH 6/6] cgroup: kill subsys->can_attach_task(), pre_attach() and attach_task() Tejun Heo
2011-08-25 22:48   ` [PATCHSET] cgroup: introduce cgroup_taskset and consolidate subsys methods, take#2 Tejun Heo
2011-08-26  8:05   ` Li Zefan
2011-08-25 22:48 ` Tejun Heo
2011-08-25 22:48 ` Tejun Heo
2011-08-26  8:05 ` Li Zefan
2011-08-26  8:05 ` Li Zefan
2011-08-26 14:09   ` Tejun Heo
2011-08-26 14:56     ` Paul Menage
2011-08-26 14:56     ` Paul Menage
     [not found]     ` <20110826140900.GF2632-Gd/HAXX7CRxy/B6EtB590w@public.gmane.org>
2011-08-26 14:56       ` Paul Menage
2011-08-26 14:09   ` Tejun Heo
     [not found]   ` <4E5753D3.9080500-BthXqXjhjHXQFUHtdCDX3A@public.gmane.org>
2011-08-26 14:09     ` Tejun Heo
  -- strict thread matches above, loose matches on Subject: below --
2011-08-23 22:19 [PATCHSET] cgroup: introduce cgroup_taskset and consolidate subsys methods Tejun Heo
2011-08-23 22:19 ` [PATCH 3/6] cgroup: introduce cgroup_taskset and use it in subsys->can_attach(), cancel_attach() and attach() Tejun Heo
2011-08-25  0:39   ` KAMEZAWA Hiroyuki
2011-08-25  0:39   ` KAMEZAWA Hiroyuki
2011-08-25  8:20     ` Tejun Heo
2011-08-25  8:20     ` Tejun Heo
     [not found]       ` <20110825082049.GC3286-Gd/HAXX7CRxy/B6EtB590w@public.gmane.org>
2011-08-25  8:21         ` KAMEZAWA Hiroyuki
2011-08-25  8:21       ` KAMEZAWA Hiroyuki
2011-08-25  8:40         ` Tejun Heo
     [not found]         ` <20110825172140.eb34809f.kamezawa.hiroyu-+CUm20s59erQFUHtdCDX3A@public.gmane.org>
2011-08-25  8:40           ` Tejun Heo
2011-08-25  8:40         ` Tejun Heo
2011-08-25  8:37           ` KAMEZAWA Hiroyuki
     [not found]           ` <CAOS58YPM=cuWjAF+VJ4QJ8bnRcVtaDCVXBJCpdWg+2=2GmnKrA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2011-08-25  8:37             ` KAMEZAWA Hiroyuki
2011-08-25  8:37           ` KAMEZAWA Hiroyuki
2011-08-25  8:21       ` KAMEZAWA Hiroyuki
     [not found]     ` <20110825093958.75b95bd8.kamezawa.hiroyu-+CUm20s59erQFUHtdCDX3A@public.gmane.org>
2011-08-25  8:20       ` Tejun Heo
2011-08-25  9:14   ` Paul Menage
2011-08-25  9:20     ` Tejun Heo
2011-08-25  9:32       ` Paul Menage
2011-08-25  9:32       ` Paul Menage
     [not found]       ` <20110825092045.GG3286-Gd/HAXX7CRxy/B6EtB590w@public.gmane.org>
2011-08-25  9:32         ` Paul Menage
     [not found]     ` <CALdu-PDAgqeRJt5vqTB9wddwz70Yn+Jf-Pb0dDKDBD_q37tHQg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2011-08-25  9:20       ` Tejun Heo
2011-08-25  9:20     ` Tejun Heo
     [not found]   ` <1314138000-2049-4-git-send-email-tj-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
2011-08-25  0:39     ` KAMEZAWA Hiroyuki
2011-08-25  9:14     ` Paul Menage
2011-08-25  9:32     ` Paul Menage
2011-08-25  9:14   ` Paul Menage
2011-08-25  9:32   ` Paul Menage
2011-08-25  9:32   ` Paul Menage
     [not found] ` <1314138000-2049-1-git-send-email-tj-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
2011-08-23 22:19   ` Tejun Heo
2011-08-23 22:19 ` Tejun Heo

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.