Re: [PATCH v1] PM: sleep: Do not flag runtime PM workqueue as freezable
From: YangYang
Date: Tue Dec 02 2025 - 05:37:21 EST
On 2025/12/2 3:58, Rafael J. Wysocki wrote:
On Monday, December 1, 2025 7:47:46 PM CET Rafael J. Wysocki wrote:
On Mon, Dec 1, 2025 at 10:46 AM YangYang <yang.yang@xxxxxxxx> wrote:
[cut]
If blk_queue_enter() or __bio_queue_enter() is allowed to race with
disabling runtime PM for q->dev, failure to resume q->dev is alway
possible and there are no changes that can be made to
pm_runtime_disable() to prevent that from happening. If
__pm_runtime_disable() wins the race, it will increment
power.disable_depth and rpm_resume() will bail out when it sees that
no matter what.
You should not conflate "runtime PM doesn't work when it is disabled"
with "asynchronous runtime PM doesn't work after freezing the PM
workqueue". They are both true, but they are not the same.
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. I'll perform some tests with this patch applied.