[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20140516160835.GE5379@htj.dyndns.org>
Date: Fri, 16 May 2014 12:08:35 -0400
From: Tejun Heo <tj@...nel.org>
To: lizefan@...wei.com
Cc: cgroups@...r.kernel.org, linux-kernel@...r.kernel.org,
hannes@...xchg.org
Subject: Re: [PATCHSET cgroup/for-3.16] cgroup: iterate cgroup_subsys_states
directly
On Fri, May 09, 2014 at 05:31:17PM -0400, Tejun Heo wrote:
> Hello,
>
> Currently, while csses (cgroup_subsys_states) have ->parent linkage
> too, only cgroups form full tree through their ->children and
> ->sibling fields and css iterations naturally is implemented by
> iterating cgroups and then dereferencing the css for the specified
> subsystem.
>
> There are now use cases where controllers need to iterate through
> csses regardless of their online state as long as they have positive
> reference. This can't easily be achieved by iterating cgroups because
> its css pointer array needs to be cleared on offline and there may be
> multiple dying csses for a cgroup for the same subsystem and there's
> only one pointer per cgroup-subsystem pair.
>
> This patchset moves ->children and ->sibling from cgroup to css and
> link all csses in proper trees and then make css iterators walk csses
> directly instead of going through cgroups. This achieves iteration of
> all non-released csses while also simplifying the iteration
> implementation. This is also in line with the general direction of
> using csses as the primary structural component.
>
> This patchset contains the following fourteen patches.
>
> 0001-cgroup-remove-css_parent.patch
> 0002-cgroup-remove-pointless-has-tasks-children-test-from.patch
> 0003-memcg-update-memcg_has_children-to-use-css_next_chil.patch
> 0004-device_cgroup-remove-direct-access-to-cgroup-childre.patch
> 0005-cgroup-remove-cgroup-parent.patch
> 0006-cgroup-move-cgroup-sibling-and-children-into-cgroup_.patch
> 0007-cgroup-link-all-cgroup_subsys_states-in-their-siblin.patch
> 0008-cgroup-move-cgroup-serial_nr-into-cgroup_subsys_stat.patch
> 0009-cgroup-introduce-CSS_RELEASED-and-reduce-css-iterati.patch
> 0010-cgroup-iterate-cgroup_subsys_states-directly.patch
> 0011-cgroup-use-CSS_ONLINE-instead-of-CGRP_DEAD.patch
> 0012-cgroup-convert-cgroup_has_live_children-into-css_has.patch
> 0013-device_cgroup-use-css_has_online_children-instead-of.patch
> 0014-cgroup-implement-css_tryget.patch
Applied to cgroup/for-3.16 with the minor updates to accomodate
CSS_NO_REF.
Thanks.
--
tejun
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists