Re: [PATCH V2 0/4] introduce device async actions mechanism

From: Alan Stern
Date: Tue Aug 11 2009 - 11:54:06 EST


On Tue, 11 Aug 2009, Rafael J. Wysocki wrote:

> In fact, we don't need the layers at all. The only thing we have to assure is
> that, during resume, the devices given device depends on will be handled
> before we start to handle this particular device (inversely during suspend).
>
> Please note that we're not even allowed to start executing the device's
> resume callback before the callbacks of the devices it depends on have
> returned (the same applies to the suspend callbacks, but the other way around).

The general algorithm for maximum parallelism goes as follows: Start by
resuming (in parallel) all the devices which don't depend on anything
else. Each time a resume finishes, you go on to resume (in parallel)
all the devices which depend only on resumed devices and which haven't
yet started to resume.

As described, this can require a large number of threads. It also
requires detailed knowledge of which devices depend on others, which we
don't have.

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 http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/