[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <201008020044.57155.rjw@sisk.pl>
Date: Mon, 2 Aug 2010 00:44:56 +0200
From: "Rafael J. Wysocki" <rjw@...k.pl>
To: paulmck@...ux.vnet.ibm.com
Cc: Alan Stern <stern@...land.harvard.edu>,
linux-pm@...ts.linux-foundation.org, linux-kernel@...r.kernel.org,
arve@...roid.com, mjg59@...f.ucam.org, pavel@....cz,
florian@...kler.org, swetland@...gle.com, peterz@...radead.org,
tglx@...utronix.de, alan@...rguk.ukuu.org.uk
Subject: Re: Attempted summary of suspend-blockers LKML thread
On Sunday, August 01, 2010, Paul E. McKenney wrote:
> On Sun, Aug 01, 2010 at 05:41:30PM +0200, Rafael J. Wysocki wrote:
> > On Saturday, July 31, 2010, Alan Stern wrote:
> > > On Sat, 31 Jul 2010, Paul E. McKenney wrote:
...
> > > On Android this goes somewhat farther. IIUC, they want hardly anything
> > > to run while the display is powered off. (But my understanding could
> > > be wrong.)
> >
> > Not really. Quite a lot of things happen on these systems while the display
> > is off (let alone the periodic battery monitoring on Nexus One :-)). They
> > can send things over the network and do similar stuff in that state.
> >
> > I think the opposite is true, ie. the display is aggressively turned off
> > whenever it appears not to be used, because it draws a lot of power.
>
> Fair enough. It appears to me that Android won't suspend if the display
> is on, but I could easily be confused here.
That's correct. In fact, Android uses a special mechanism called "early
suspend" (or similar) to suspend the display and some other devices before the
"real" suspend happens.
...
> > > > o Power-naive applications must be prohibited from controlling
> > > > the system power state. One acceptable approach is through
> > > > use of group permissions on a special power-control device.
> > >
> > > You mean non-power-aware applications, not power-naive applications.
> > > But then the statement is redundant; it follows directly from the
> > > definition of "power-aware".
> >
> > Agreed.
>
> OK, but I still believe that an enforcement mechanism is required.
The requirement is that power-oblivious applications should not participate
in deciding whether or not to put the system into a sleep state which is pretty
much by definition.
> > > > o Statistics of the power-control actions taken by power-aware
> > > > applications must be provided, and must be keyed off of program
> > > > name.
> > > >
> > > > o Power-aware applications can make use of power-naive infrastructure.
> > > > This means that a power-aware application must have some way,
> > > > whether explicit or implicit, to ensure that any power-naive
> > > > infrastructure is permitted to run when a power-aware application
> > > > needs it to run.
> > > >
> > > > o When a power-aware application is preventing the system from
> > > > shutting down, and is also waiting on a power-naive application,
> > > > the power-aware application must set a timeout to handle
> > > > the possibility that the power-naive application might halt
> > > > or otherwise fail. (Such timeouts are also used to limit the
> > > > number of kernel modifications required.)
> > >
> > > No, this is not a requirement. A power-optimized application would do
> > > this, of course, by definition. But a power-aware application doesn't
> > > have to.
> >
> > Agreed.
>
> Again, this requirement was explicitly called out by the Android folks.
Rather, there should be a mechanism allowing PM-driving applications to do
that, but they are not required to use that mechanism.
Thanks,
Rafael
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists