Messages in this thread | | | From | Paul Menage <> | Date | Tue, 16 Nov 2010 11:56:33 -0800 | Subject | Re: [RFC/RFT PATCH v3] sched: automated per tty task groups |
| |
On Tue, Nov 16, 2010 at 11:45 AM, Linus Torvalds <torvalds@linux-foundation.org> wrote: > > In a system daemon? Good luck with that. It's a nightmare. Maybe you > could just poll all the cgroups, and try to remove them once a minute, > and if they are empty it works. Or something like that. But what a > hacky thing it would be.
There's an existing cgroups API - release_agent and notify_on_release - whereby the kernel will spawn a userspace command once a given cgroup is completely empty. It's intended for pretty much exactly this purpose.
Paul
| |