linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCHSET cgroup/for-3.12] cgroup: decouple cgroup_subsys_state lifetime from that of cgroup
@ 2013-08-08 20:13 Tejun Heo
  2013-08-08 20:13 ` [PATCH 01/14] cgroup: always use cgroup_css() Tejun Heo
                   ` (15 more replies)
  0 siblings, 16 replies; 21+ messages in thread
From: Tejun Heo @ 2013-08-08 20:13 UTC (permalink / raw)
  To: lizefan; +Cc: containers, cgroups, linux-kernel

Hello,

Currently a css's (cgroup_subsys_state) lifetime is tied to that of
the cgroup it's attached to.  css's are created when the cgroup is
created and destroyed together.  The access rules depend on it too -
e.g. css's can be dereferenced while holding RCU read lock because
cgroup is protected with RCU.

With the planned unified hierarchy, we'll be dynamically creating and
destroying css's through the lifetime of a cgroup, so we can no longer
hitch css lifetime management onto cgroup's.  This patchset separates
out css lifetime management from that of cgroup.  After the patchset,
each css is individually RCU protected.

This patchset contains the following 14 patches.

 0001-cgroup-always-use-cgroup_css.patch
 0002-cgroup-rename-cgroup_subsys_state-dput_work-and-its-.patch
 0003-cgroup-add-cgroup_subsys_state-parent.patch
 0004-cgroup-cgroup_css_from_dir-now-should-be-called-with.patch
 0005-cgroup-make-cgroup_file_open-rcu_read_lock-around-cg.patch
 0006-cgroup-add-__rcu-modifier-to-cgroup-subsys.patch
 0007-cgroup-reorganize-css-init-exit-paths.patch
 0008-cgroup-move-cgroup-subsys-assignment-to-online_css.patch
 0009-cgroup-bounce-cgroup_subsys_state-ref-kill-confirmat.patch
 0010-cgroup-replace-cgroup-css_kill_cnt-with-nr_css.patch
 0011-cgroup-decouple-cgroup_subsys_state-destruction-from.patch
 0012-cgroup-factor-out-kill_css.patch
 0013-cgroup-move-subsys-file-removal-to-kill_css.patch
 0014-cgroup-RCU-protect-each-cgroup_subsys_state-release.patch

The patchset is on top of

  cgroup/for-3.12 61584e3f4 ("cgroup: Merge branch 'for-3.11-fixes' into for-3.12")
+ [1] cgroup: use cgroup_subsys_state as the primary subsystem interface handle
+ [2] cgroup: cgroup: make css_for_each_descendant() and friends include the origin css in the iteration

and available in the following branch.

 git://git.kernel.org/pub/scm/linux/kernel/git/tj/cgroup.git review-rcufy-css

diffstat follows.

 include/linux/cgroup.h |   24 +-
 kernel/cgroup.c        |  423 +++++++++++++++++++++++++++++--------------------
 kernel/events/core.c   |    3
 3 files changed, 268 insertions(+), 182 deletions(-)

Thanks.

--
tejun

[1] https://lkml.org/lkml/2013/8/1/722
[2] https://lkml.org/lkml/2013/8/4/130

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

end of thread, other threads:[~2013-08-14  0:27 UTC | newest]

Thread overview: 21+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-08-08 20:13 [PATCHSET cgroup/for-3.12] cgroup: decouple cgroup_subsys_state lifetime from that of cgroup Tejun Heo
2013-08-08 20:13 ` [PATCH 01/14] cgroup: always use cgroup_css() Tejun Heo
2013-08-08 20:13 ` [PATCH 02/14] cgroup: rename cgroup_subsys_state->dput_work and its callback function Tejun Heo
2013-08-08 20:13 ` [PATCH 03/14] cgroup: add cgroup_subsys_state->parent Tejun Heo
2013-08-08 20:13 ` [PATCH 04/14] cgroup: cgroup_css_from_dir() now should be called with RCU read locked Tejun Heo
2013-08-08 20:13 ` [PATCH 05/14] cgroup: make cgroup_file_open() rcu_read_lock() around cgroup_css() and add cfent->css Tejun Heo
2013-08-08 20:13 ` [PATCH 06/14] cgroup: add __rcu modifier to cgroup->subsys[] Tejun Heo
2013-08-08 20:13 ` [PATCH 07/14] cgroup: reorganize css init / exit paths Tejun Heo
2013-08-12  2:47   ` Li Zefan
2013-08-12 13:39     ` Tejun Heo
2013-08-12 13:40   ` [PATCH v2 " Tejun Heo
2013-08-08 20:13 ` [PATCH 08/14] cgroup: move cgroup->subsys[] assignment to online_css() Tejun Heo
2013-08-14  0:27   ` [PATCH v2 " Tejun Heo
2013-08-08 20:13 ` [PATCH 09/14] cgroup: bounce cgroup_subsys_state ref kill confirmation to a work item Tejun Heo
2013-08-08 20:13 ` [PATCH 10/14] cgroup: replace cgroup->css_kill_cnt with ->nr_css Tejun Heo
2013-08-08 20:13 ` [PATCH 11/14] cgroup: decouple cgroup_subsys_state destruction from cgroup destruction Tejun Heo
2013-08-08 20:13 ` [PATCH 12/14] cgroup: factor out kill_css() Tejun Heo
2013-08-08 20:13 ` [PATCH 13/14] cgroup: move subsys file removal to kill_css() Tejun Heo
2013-08-08 20:13 ` [PATCH 14/14] cgroup: RCU protect each cgroup_subsys_state release Tejun Heo
2013-08-13  1:19 ` [PATCHSET cgroup/for-3.12] cgroup: decouple cgroup_subsys_state lifetime from that of cgroup Li Zefan
2013-08-13 15:02 ` Tejun Heo

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).