Re: [PATCH, v10 3/3] cgroups: introduce timer slack controller

Matthew Garrett
2011-10-17T03:23:02Z

On Mon, Oct 17, 2011 at 03:39:21AM +0200, Lennart Poettering wrote:
> On Sat, 15.10.11 21:11, Peter Zijlstra (peterz@infradead.org) wrote:
> > I would argue this is an excellent reason not to merge this. This really
> > is in the camp of lets paper over shitty userspace instead of fix it.
> >
> > Such a scheme takes away the immediate need to fix crap and therefore
> > crap will not get fixed. Why not focus on creating tools (I think
> > powertop really already does everything you need) and track down WTF
> > apps are firing so many timers when the screen if off.
>
> Well, maybe that works in fantasy land. In real life however there's
> stuff like closed source crap, and all kinds of other things you cannot
> fix. In a world where everybody wants "apps" (i.e. 3rd party code
> running with limited privileges) your chance to fix every bit of code is
> gone.

I agree. We can't assume perfect software, and I don't think *requiring*
the duplication of this functionality in every single session
application is sensible. We want to be able to shut down timer based
code when the session is idle. We could do this by exposing the slack in
/proc. We could do this by modifying every piece of code to listen for
session idle events and (independently) enact session-wide policy. Or we
could just accept that it's a problem that maps onto what people are
already using cgroups for and implement it in the same way.

--
Matthew Garrett | mjg59@srcf.ucam.org