Re: Re: Suspend without the freezer

Alan Stern
2007-08-01T20:16:15Z

On Wed, 1 Aug 2007, Rafael J. Wysocki wrote:

> > I don't think removal during suspend poses a serious problem. It can
> > never lead to a situation where a suspended parent has an unsuspended
> > child, which is what we need to avoid.
>
> With our current design, removal during resume, before the device is put back
> onto dpm_active, may lead to nasty problems. I haven't analysed that in
> detail, but at least generally it seems highly suspicious to me.

In the patch set I posted, device removal during suspend or resume is
blocked. The PM core acquires every device's semaphore at the start of
the suspend and doesn't release it until the end of the resume -- and I
added a line to device_pm_remove() to lock the semaphore.

My best guess is that allowing removal at these times wouldn't hurt
anything. But if the device is on one of the lists other than
dpm_active, taking it off would mean the PM core never gets a chance to
unlock the device's semaphore and could lead to hangups later. So I
disallowed it.

Alan Stern