From mboxrd@z Thu Jan 1 00:00:00 1970 From: Peter Zijlstra Subject: Re: [linux-pm] [PATCH 0/8] Suspend block api (version 8) Date: Thu, 27 May 2010 16:43:57 +0200 Message-ID: <1274971437.27810.5078.camel@twins> References: <20100526120242.5c9b73ad@schatten.dmk.lab> <20100526133721.602633b2@schatten.dmk.lab> <20100526142430.327ccbc4@schatten.dmk.lab> <20100526141612.3e2e0443@lxorguk.ukuu.org.uk> <20100527003943.07c17f85@lxorguk.ukuu.org.uk> <20100527140655.GA28048@srcf.ucam.org> <1274970531.27810.5024.camel@twins> <20100527143508.GA30117@srcf.ucam.org> <1274971317.27810.5070.camel@twins> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8BIT Return-path: Received: from bombadil.infradead.org ([18.85.46.34]:55483 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753608Ab0E0OoE convert rfc822-to-8bit (ORCPT ); Thu, 27 May 2010 10:44:04 -0400 In-Reply-To: <1274971317.27810.5070.camel@twins> Sender: linux-omap-owner@vger.kernel.org List-Id: linux-omap@vger.kernel.org To: Matthew Garrett Cc: Alan Cox , Arve =?ISO-8859-1?Q?Hj=F8nnev=E5g?= , Florian Mickler , Vitaly Wool , LKML , felipe.balbi@nokia.com, Linux OMAP Mailing List , Linux PM On Thu, 2010-05-27 at 16:41 +0200, Peter Zijlstra wrote: > On Thu, 2010-05-27 at 15:35 +0100, Matthew Garrett wrote: > > On Thu, May 27, 2010 at 04:28:51PM +0200, Peter Zijlstra wrote: > > > On Thu, 2010-05-27 at 15:06 +0100, Matthew Garrett wrote: > > > > one way which indicates to the scheduler that tasks in TASK_RUNNING > > > > should be scheduled, and when the session is idle we set the flag the > > > > other way and all processes in that cgroup get shifted to > > > > TASK_INTERRUPTIBLE or something. > > > > > > What's wrong with simply making the phone beep loudly and displaying: > > > bouncing cows is preventing your phone from sleeping! > > > > Well, primarily that it's possible to design an implementation where it > > *doesn't* prevent your phone froms sleeping, but also because a given > > application may justifiably be preventing your phone from sleeping for a > > short while. What threshold do you use to determine the difference? > > Whatever you want, why would the kernel care? > > You can create a whole resource management layer in userspace, with > different privilidge/trust levels. Trusted apps may wake more than > untrusted apps. Who cares. > > The thing is, you can easily detect what keeps your cpu from idling. > What you do about it a pure userspace solution. > > You can use the QoS stuff to give hints, like don't wake me more than 5 > times a minute, if with those hints an app still doesn't meet whatever > criteria are suitable for the current mode, yell at it. Or adjust its > QoS parameters for it. > > Heck, for all I care, simply SIGKILL the thing and report it once the > user starts looking at his screen again. Provide incentive for Joe Clicker to improve his app, instead of cope with the shit he created.