• Rafael J. Wysocki's avatar
    PM: Start asynchronous resume threads upfront · 97df8c12
    Rafael J. Wysocki authored
    It has been shown by testing that total device resume time can be
    reduced significantly (by as much as 50% or more) if the async
    threads executing some devices' resume routines are all started
    before the main resume thread starts to handle the "synchronous"
    devices.
    
    This is a consequence of the fact that the slowest devices tend to be
    located at the end of dpm_list, so their resume routines are started
    very late.  Consequently, they have to wait for all the preceding
    "synchronous" devices before their resume routines can be started
    by the main resume thread, even if they are "asynchronous".  By
    starting their async threads upfront we effectively move those
    devices towards the beginning of dpm_list, without breaking their
    ordering with respect to their parents and children.  As a result,
    their resume routines are started much earlier and we are able to
    save much more device resume time this way.
    Signed-off-by: default avatarRafael J. Wysocki <rjw@sisk.pl>
    97df8c12
main.c 25.4 KB