lkml.org 
[lkml]   [2010]   [May]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 0/8] Suspend block api (version 6)
* Matthew Garrett <mjg@redhat.com> [100511 09:41]:
> On Tue, May 11, 2010 at 09:36:33AM -0700, Tony Lindgren wrote:
> > OK, so can the suspend blocker then become just:
> >
> > # Block suspend while idle, system stays running
> > # echo default > /sys/power/policy
> >
> > and the when it's OK to suspend:
> >
> > # Allow suspend while idle, system suspends when it hits kernel idle loop
> > # echo opportunistic > /sys/power/policy
> >
> > or do you still need something more to ensure the data gets into your
> > app and be handled?
>
> Yes. You still need suspend blocks.

Maybe not if echo opportunistic > /sys/power/policy gets cleared by
the kernel if the kernel idle loop can't make it. That means something
has blocked the suspend attempt in a driver for example. The system
keeps running, and the userspace can deal with the situation.

> > The part I really don't like is the idea of patching all over the drivers
> > and userspace for the wakelocks/suspendblocks.
>
> I don't like the idea either, but given that nobody has actually
> provided any other ideas that would actually work then I don't think
> we've got a great deal of choice.

If the opportunistic kernel flag is one time attempt only, then you
could take care of the wakelock/suspendblock handling in the userspace
completely. And once the userspace wakelock/suspendblock is cleared,
the userspace can again echo opportunistic > /sys/power/policy.

Regards,

Tony


\
 
 \ /
  Last update: 2010-05-12 10:17    [W:0.239 / U:2.532 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site