[Devel] Re: [PATCH 1/2] cgroup: Set CGRP_RELEASABLE when adding to a cgroup
Paul Menage
menage at google.com
Sat Dec 18 11:30:57 PST 2010
On Thu, Dec 16, 2010 at 5:12 PM, Colin Cross <ccross at android.com> wrote:
>
> No, if you add a new process to the group while check_for_release, the
> bit could get set by the add for the new process, then cleared by the
> concurrently running check_for_release.
OK, so we need the semantics that whenever the cgroup goes from a state of
having at least one process or subdir in it, to a state of having no
processes and no outstanding css references, we generate a release_agent
event.
I think the cleanest way to handle that is to use more bits - a counter to
track processes moving into a group or child cgroup creations, and another
that's synced to the value read from the first whenever we schedule a
release event.
A cgroup is releasable when the counters are different.
Paul
_______________________________________________
Containers mailing list
Containers at lists.linux-foundation.org
https://lists.linux-foundation.org/mailman/listinfo/containers
More information about the Devel
mailing list