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

From: Arjan van de Ven
Date: Mon Oct 17 2011 - 01:22:38 EST


On 10/16/2011 8:22 PM, Matthew Garrett wrote:
On Mon, Oct 17, 2011 at 03:39:21AM +0200, Lennart Poettering wrote:
On Sat, 15.10.11 21:11, Peter Zijlstra (peterz@xxxxxxxxxxxxx) 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.

and..it's not like we let the bad guys go free.
We actually seriously hurt their behavior while we throttle their timers here.


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/