Re: [PATCH v1] PM: sleep: Do not flag runtime PM workqueue as freezable

From: Rafael J. Wysocki
Date: Tue Dec 02 2025 - 08:30:13 EST


On Tue, Dec 2, 2025 at 12:53 PM Rafael J. Wysocki <rafael@xxxxxxxxxx> wrote:
>
> On Tue, Dec 2, 2025 at 2:06 AM Bart Van Assche <bvanassche@xxxxxxx> wrote:
> >
> > On 12/1/25 11:58 AM, Rafael J. Wysocki wrote:
> > > So I've been testing the patch below for a few days and it will eliminate
> > > the latter, but even after this patch runtime PM will be disabled in
> > > device_suspend_late() and if the problem you are facing is still there
> > > after this patch, it will need to dealt with at the driver level.
> > >
> > > Generally speaking, driver involvement is needed to make runtime PM and
> > > system suspend/resume work together in the majority of cases.
> >
> > Thank you for having developed and shared this patch. Is the following
> > quote from the Linux kernel documentation still correct with this patch
> > applied or should an update for Documentation/power/runtime_pm.rst
> > perhaps be included in this patch?
> >
> > "The power management workqueue pm_wq in which bus types and device
> > drivers can
> > put their PM-related work items. It is strongly recommended that
> > pm_wq be
> > used for queuing all work items related to runtime PM, because this
> > allows
> > them to be synchronized with system-wide power transitions (suspend
> > to RAM,
> > hibernation and resume from system sleep states). pm_wq is declared in
> > include/linux/pm_runtime.h and defined in kernel/power/main.c."
>
> It doesn't say what the synchronization mechanism is in particular and
> some synchronization is still provided after this patch, via the
> pm_runtime_barrier() in device_suspend(), for example.

Though there is another piece of documentation that needs updating to
reflect the changes in this patch, so I'll send a v2 at one point.