mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH v1 0/5] PM: sleep: Improvements of async suspend and resume of devices
@ 2025-02-25 16:38 Rafael J. Wysocki
  2025-02-25 16:38 ` [PATCH v1 1/5] PM: sleep: Rename power.async_in_progress to power.work_in_progress Rafael J. Wysocki
                   ` (6 more replies)
  0 siblings, 7 replies; 20+ messages in thread
From: Rafael J. Wysocki @ 2025-02-25 16:38 UTC (permalink / raw)
  To: Linux PM
  Cc: LKML, Alan Stern, Ulf Hansson, Johan Hovold,
	Manivannan Sadhasivam, Saravana Kannan

Hi Everyone,

Initially, this was an attempt to address the problems described by
Saravana related to spawning async work for any async device upfront
in the resume path:

https://lore.kernel.org/linux-pm/20241114220921.2529905-1-saravanak@google.com/

but then I realized that it could be extended to the suspend path and
used for speeding it up, which it really does.

Overall, the idea is that instead of starting an async work item for every
async device upfront, which is not very efficient because the majority of
those devices will not be able to make progress due to dependencies anyway,
the async handling is only started upfront for the devices that are likely
to be able to make progress.  That is, devices without parents in the resume
path and leaf devices (ie. devices without children or consumers) in the
suspend path (the underlying observation here is that devices without parents
are likely to have no suppliers too whereas devices without children that
have consumers are not unheard of).  This allows to reduce the amount of
processing that needs to be done to start with.

Then, after processing every device ("async" or "sync"), "async" processing
is started for some devices that have been "unblocked" by it, which are its
children in the resume path or its parent and its suppliers in the suspend
path.  This allows asynchronous handling to start as soon as it makes sense
without delaying the "async" devices unnecessarily.

Fortunately, the additional plumbing needed to implement this is not
particularly complicated.

The first two patches in the series are preparatory.

Patch [3/5] deals with the resume path for all device resume phases.

Patch [4/5] optimizes the "suspend" phase which has the most visible effect (on
the systems in my office the speedup is in the 100 ms range which is around 20%
of the total device resume time).

Patch [5/5] extend this to the "suspend late" and "suspend noirq" phases.

Thanks!




^ permalink raw reply	[flat|nested] 20+ messages in thread

end of thread, other threads:[~2025-03-13 15:16 UTC | newest]

Thread overview: 20+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-02-25 16:38 [PATCH v1 0/5] PM: sleep: Improvements of async suspend and resume of devices Rafael J. Wysocki
2025-02-25 16:38 ` [PATCH v1 1/5] PM: sleep: Rename power.async_in_progress to power.work_in_progress Rafael J. Wysocki
2025-02-25 16:39 ` [PATCH v1 2/5] PM: sleep: Rearrange dpm_async_fn() and async state clearing Rafael J. Wysocki
2025-02-25 16:45 ` [PATCH v1 3/5] PM: sleep: Resume children right after resuming the parent Rafael J. Wysocki
2025-03-13  1:46   ` Saravana Kannan
2025-03-13 15:16     ` Rafael J. Wysocki
2025-02-25 16:45 ` [PATCH v1 4/5] PM: sleep: Start suspending parents and suppliers after subordinate suspend Rafael J. Wysocki
2025-03-13  1:46   ` Saravana Kannan
2025-03-13 13:53     ` Rafael J. Wysocki
2025-02-25 16:45 ` [PATCH v1 5/5] PM: sleep: Make late and noirq suspend of devices more asynchronous Rafael J. Wysocki
2025-03-13  1:47   ` Saravana Kannan
2025-03-13 13:32     ` Rafael J. Wysocki
2025-02-27 15:44 ` [PATCH v1 0/5] PM: sleep: Improvements of async suspend and resume of devices Saravana Kannan
2025-02-27 16:23   ` Rafael J. Wysocki
2025-03-09 22:37     ` Saravana Kannan
2025-03-10 16:01       ` Rafael J. Wysocki
2025-03-10 20:31         ` Saravana Kannan
2025-03-10 21:29           ` Rafael J. Wysocki
2025-03-03 12:06 ` Ulf Hansson
2025-03-03 12:08   ` Rafael J. Wysocki

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®