Re: [RFD] Automatic suspend

From: Rafael J. Wysocki
Date: Fri Feb 27 2009 - 15:58:42 EST


On Friday 27 February 2009, Alan Stern wrote:
> 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...

Yes, it's important to remeber IMO.

Thanks,
Rafael
--
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/