On Fri, Jan 10, 2020 at 02:14:19PM -0800, Suren Baghdasaryan wrote: > > Yeah, the current behavior isn't quite consistent with the > > documentation and what we prolly wanna do is allowing destroying a > > cgroup with only dead processes in it. That said, the correct (or at > > least workable) signal which indicates that a cgroup is ready for > > removal is cgroup.events::populated being zero, which is a poll(2)able > > event. > > Unfortunately it would not be workable for us as it's only available > for cgroup v2 controllers. > I can think of other ways to fix it in the userspace but there might > be other cgroup API users which are be broken after this change. I > would prefer to fix it in the kernel if at all possible rather than > chasing all possible users. Yeah, the right thing to do is allowing destruction of cgroups w/ only dead processes in it. -- tejun