lkml.org 
[lkml]   [2009]   [Feb]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [RFD] Automatic suspend
Date
Am Freitag 20 Februar 2009 11:46:55 schrieb Rafael J. Wysocki:
> On Thursday 19 February 2009, Oliver Neukum wrote:
> > Am Donnerstag 19 Februar 2009 23:21:46 schrieb Rafael J. Wysocki:
> > > > That's the whole point behind userspace wakelocks! They provide a
> > > > mechanism for userspace to tell the kernel when (as far as userspace
> >
> > is
> >
> > > > concerned) it is or is not okay to auto-sleep.
> > >
> > > Still, one can go further and observe that the user space can in fact
> > > start automatic suspend by itself whenever it knows it's appropriate
> > > ...
> >
> > User space initiating this is a race condition.
>
> Do you mean a race with the other user space processes or with the kernel?

With the set of runnable processes.There's always a window between
evaluating the current set of runnable tasks and telling the kernel to sleep.
IMO the most elegant solution would be a task attribute that would signal
the kernel that a task should not count as keeping the system busy even
if it is runnable and trigger the sleep in kernel space.

Regards
Oliver



\
 
 \ /
  Last update: 2009-02-20 23:03    [from the cache]
©2003-2011 Jasper Spaans