lkml.org 
[lkml]   [2009]   [Feb]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [RFD] Automatic suspend
On Fri, 27 Feb 2009, Pavel Machek wrote:

>
> > To summarize, we can:
> > * Use a refcount such that automatic suspend will only be possible if it's
> > equal to zero (but that need not be the only criterion).
> > * Use a per-device flag in dev_pm_info that will be set whenever the device
> > driver increases the refcount and unset whenever the driver decreases the
> > refcount.
> > * Use a per-process flag that will be set whenever the process increases the
> > refcount and unset whenever the process decreases the refcount.
>
> Yes, that sounds sane, and that's how reasonable wakelock
> implementation should look like.

One small point: If you add a per-device flag and a per-process flag as
described above, then drivers and processes must not acquire nested
references.

Obviously this is fixable, but it's worth mentioning...

Alan Stern



\
 
 \ /
  Last update: 2009-02-27 15:49    [W:0.036 / U:0.432 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site