Re: [PATCH 2/6] PM: Asynchronous resume of devices

From: Alan Stern
Date: Fri Aug 28 2009 - 11:43:14 EST

On Wed, 26 Aug 2009, Rafael J. Wysocki wrote:

> From: Rafael J. Wysocki <rjw@xxxxxxx>
> Theoretically, the total time of system sleep transitions (suspend
> to RAM, hibernation) can be reduced by running suspend and resume
> callbacks of device drivers in parallel with each other. However,
> there are dependencies between devices such that, for example, we may
> not be allowed to put one device into a low power state before
> anohter one has been suspended (e.g. we cannot suspend a bridge
> before suspending all devices behind it). In particular, we're not
> allowed to suspend the parent of a device before suspending the
> device itself. Analogously, we're not allowed to resume a device
> before resuming its parent.

> In this version of the patch the async threads started to execute
> the resume callbacks of specific device don't exit immediately having
> done that, but search dpm_list for devices whose PM dependencies have
> already been satisfied and execute their callbacks without waiting.

Given this design, why bother to invoke device_resume() for the async
devices? Why not just start up a bunch of async threads, each of which
calls async_resume() repeatedly until everything is finished? (And
rearrange async_resume() to scan the list first and do the actual
resume second.)

The same goes for the noirq versions.

Alan Stern

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at
Please read the FAQ at