Re: [PATCH 1/1] PM: Start asynchronous suspend threads upfront
From: Greg KH
Date: Tue Jun 18 2024 - 07:41:37 EST
On Tue, Jun 18, 2024 at 05:35:07PM +0800, Kaiyen Chang wrote:
> Currently, when performing a suspend operation, all devices on the
> dpm_list must wait for preceding "synchronous" devices to complete
> before the main suspend thread can start their suspend routines,
> even if they are "asynchronous". If the suspend routine of a
> synchronous device must enter a waiting state for some reason, it
> will cause the main suspend thread to wait as well, thereby
> delaying the processing of all subsequent devices, including
> asynchronous ones, thus ultimately extending the overall device
> suspend time.
>
> By starting the asynchronous suspend threads of asynchronous
> devices 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, even if the main
> suspend thread enters a waiting state, these asynchronous threads
> can continue to run without delay.
>
> Signed-off-by: Kaiyen Chang <kaiyen.chang@xxxxxxxxx>
> ---
> drivers/base/power/main.c | 90 +++++++++++++++++++++++++--------------
> 1 file changed, 57 insertions(+), 33 deletions(-)
Sorry, but please follow the Intel-documented rules for how to submit
kernel patches before sending them out to the community.
thanks,
greg k-h