On 08/20/2012 09:03 PM, Neil Horman wrote:
quoted
quoted
2) Keep a separate internal counter to track the number of cgroup instances
quoted
quoted
so that you only inc the static key on the first create and dec it on the last
delete.
If I got you right, than this would not be different then direclty using
static_key_slow_[inc|dec].
As long as a cgroup subsystems ->destroy method is only called when the
subsystem is being removed, then I think thats correct. I'm not 100% sure thats
the case though.
THAT is correct, but not the call itself. ->destroy() is called with the
cgroup_lock held, and there is a lockdep dependency created by cpuset
that prevents the cpu_hotplug lock, taken by static branch updates, to
be taken inside cgroup_lock.
So unless cpuset is fixed - which is a major work, we can't do
static_branch updates while holding the cgroup_lock.