From mboxrd@z Thu Jan 1 00:00:00 1970 From: =?ISO-8859-1?Q?Arve_Hj=F8nnev=E5g?= Subject: Re: suspend blockers & Android integration Date: Fri, 4 Jun 2010 17:10:48 -0700 Message-ID: References: <20100603193045.GA7188@elte.hu> <20100603231153.GA11302@elte.hu> <20100603232302.GA16184@elte.hu> <20100604071354.GA14451@elte.hu> <20100604083423.GD15181@elte.hu> <1275653210.27810.39762.camel@twins> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: QUOTED-PRINTABLE Return-path: In-Reply-To: <1275653210.27810.39762.camel@twins> Sender: linux-kernel-owner@vger.kernel.org To: Peter Zijlstra Cc: Ingo Molnar , tytso@mit.edu, Brian Swetland , Neil Brown , Thomas Gleixner , "Rafael J. Wysocki" , Alan Stern , Felipe Balbi , LKML , Florian Mickler , Linux OMAP Mailing List , Linux PM , Alan Cox , James Bottomley , Linus Torvalds , Kevin Hilman , "H. Peter Anvin" , Arjan van de Ven List-Id: linux-omap@vger.kernel.org 2010/6/4 Peter Zijlstra : > On Fri, 2010-06-04 at 01:56 -0700, Arve Hj=F8nnev=E5g wrote: >> On Fri, Jun 4, 2010 at 1:34 AM, Ingo Molnar wrote: >> > >> > * Arve Hj?nnev?g wrote: >> > >> >> > [...] >> >> > >> >> > Why do you need to track input wakeups? It's rather fragile and= rather >> >> > unnecessary [...] >> >> >> >> Because we have keys that should always turn the screen on, but t= he problem >> >> is not specific to input events. If we enabled a wakeup event it = usually >> >> means we need this event to always work, not just when the system= is fully >> >> awake or fully suspended. >> > >> > Hm, i cannot follow that generic claim. Could you please point out= the problem >> > to me via a specific example? Which task does what, what undesirab= le thing >> > happens where, etc. >> > >> >> We have many wakeup events, and some of them are invisible to the >> user. For instance on the Nexus One wake up every 10 minutes monitor >> the battery health. > >> If the user presses a key right after this work >> has finished and we did not block suspend until userspace could >> process this key event, we risk suspending before we could turn the >> screen on, which to the user looks like the key did not work. > >> Another >> example, the user pressed the power key which turns the screen off a= nd >> allows suspend. We initiate suspend and a phone call comes in. If we >> don't block suspend until we processed the incoming phone call >> notification, the phone may never ring (some devices will send a new >> message every few seconds for this, so on those devices it would jus= t >> delay the ringing). > > Right, so in the proposed scheme all these tasks would be executed by > trusted processes, and trusted processes will never get frozen and so > will never be delayed in processing these events. > There are many proposes schemes. I assume you mean freezing only untrusted processes and nothing else. > Only untrusted code will be frozen. And trusted processes are reliabl= e > for thawing the untrusted processes and delivering events to it. > I have two problems with this. I don't want to funnel all events trough trusted processes, and I also want to freeze trusted processes. > Trusted processes are assumed to be sane and idle when there is nothi= ng > for them to do, allowing the machine to go into deep idle states. > Neither the kernel nor our trusted user-space code currently meets this criteria. --=20 Arve Hj=F8nnev=E5g