Re: Attempted summary of suspend-blockers LKML thread

From: Paul E. McKenney
Date: Sun Aug 01 2010 - 20:32:24 EST


On Mon, Aug 02, 2010 at 12:44:56AM +0200, Rafael J. Wysocki wrote:
> 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.

Sounds good!

> ...
> > > > > 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.

I moved this into the definitions section -- you and Alan convince me. ;-)

> > > > > 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.

Fair enough! I moved this into a new section that I am currently calling
"SUGGESTED USAGE".

Thanx, Paul
--
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/