linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCHSET cgroup/for-3.16] cgroup: implement css->id
@ 2014-04-24 21:02 Tejun Heo
  2014-04-24 21:02 ` [PATCH 1/6] cgroup: make flags and subsys_masks unsigned int Tejun Heo
                   ` (7 more replies)
  0 siblings, 8 replies; 14+ messages in thread
From: Tejun Heo @ 2014-04-24 21:02 UTC (permalink / raw)
  To: lizefan; +Cc: cgroups, linux-kernel, hannes, mhocko, nasa4836

Hello,

Until now, cgroup->id has been used to identify all the associated
csses and css_from_id() takes cgroup ID and returns the matching css
by looking up the cgroup and then dereferencing the css associated
with it; however, now that the lifetimes of cgroup and css are
separate, this is incorrect and breaks on the unified hierarchy when a
controller is disabled and enabled back again before the previous
instance is released.

This series adds css->id which is a subsystem-unique ID and converts
css_from_id() to look up by the new css->id instead.  memcg is the
only user of css_from_id() and also converted to use css->id instead.

 0001-cgroup-make-flags-and-subsys_masks-unsigned-int.patch
 0002-cgroup-memcg-allocate-cgroup-ID-from-1.patch
 0003-cgroup-protect-cgroup_root-cgroup_idr-with-a-spinloc.patch
 0004-cgroup-use-RCU-free-in-create_css-failure-path.patch
 0005-cgroup-update-init_css-into-init_and_link_css.patch
 0006-cgroup-memcg-implement-css-id-and-convert-css_from_i.patch

0001-0003 are related prep/cleanups.

0004-0006 add css->id and convert css_from_id() and its user to it.

This patchset is on top of

  cgroup/for-3.16 f8f22e53a262 ("cgroup: implement dynamic subtree controller enable/disable on the default hierarchy")
+ [1] [PATCHSET cgroup/for-3.16] cgroup: implement cgroup.populated
+ [2] Misc comment / warning cleanups

and available in the following git branch.

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

diffstat follows.

 include/linux/cgroup.h |   21 ++++--
 kernel/cgroup.c        |  164 ++++++++++++++++++++++++++++++++-----------------
 mm/memcontrol.c        |   10 --
 3 files changed, 126 insertions(+), 69 deletions(-)

Thanks.

--
tejun

[1] http://lkml.kernel.org/g/1397056052-2829-1-git-send-email-tj@kernel.org
[2] http://lkml.kernel.org/g/1397748555-6647-1-git-send-email-nasa4836@gmail.com
    http://lkml.kernel.org/g/1397748544-6570-1-git-send-email-nasa4836@gmail.com
    http://lkml.kernel.org/g/1397748534-6490-1-git-send-email-nasa4836@gmail.com
    http://lkml.kernel.org/g/1397757955.3104.11.camel@joe-AO725

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

end of thread, other threads:[~2014-05-04 19:18 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-04-24 21:02 [PATCHSET cgroup/for-3.16] cgroup: implement css->id Tejun Heo
2014-04-24 21:02 ` [PATCH 1/6] cgroup: make flags and subsys_masks unsigned int Tejun Heo
2014-04-24 21:02 ` [PATCH 2/6] cgroup, memcg: allocate cgroup ID from 1 Tejun Heo
2014-04-30 13:11   ` Michal Hocko
2014-04-24 21:02 ` [PATCH 3/6] cgroup: protect cgroup_root->cgroup_idr with a spinlock Tejun Heo
2014-04-24 21:02 ` [PATCH 4/6] cgroup: use RCU free in create_css() failure path Tejun Heo
2014-04-24 21:02 ` [PATCH 5/6] cgroup: update init_css() into init_and_link_css() Tejun Heo
2014-04-24 21:02 ` [PATCH 6/6] cgroup, memcg: implement css->id and convert css_from_id() to use it Tejun Heo
2014-04-28  3:33   ` Li Zefan
2014-05-01 15:46     ` Tejun Heo
2014-05-04  6:02       ` Li Zefan
2014-04-30 13:24   ` Michal Hocko
2014-05-04  6:08 ` [PATCHSET cgroup/for-3.16] cgroup: implement css->id Li Zefan
2014-05-04 19:18 ` 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).