From: Yenchia Chen <yenchia.chen@mediatek.com>
To: <gregkh@linuxfoundation.org>
Cc: <angelogioacchino.delregno@collabora.com>, <len.brown@intel.com>,
<linux-arm-kernel@lists.infradead.org>,
<linux-kernel@vger.kernel.org>,
<linux-mediatek@lists.infradead.org>, <linux-pm@vger.kernel.org>,
<matthias.bgg@gmail.com>, <pavel@ucw.cz>,
<rafael.j.wysocki@intel.com>, <rafael@kernel.org>,
<stable@vger.kernel.org>, <yenchia.chen@mediatek.com>
Subject: Re: [PATCH 6.6 1/1] PM: sleep: Restore asynchronous device resume optimization
Date: Thu, 5 Sep 2024 17:34:33 +0800 [thread overview]
Message-ID: <20240905093433.4798-1-yenchia.chen@mediatek.com> (raw)
In-Reply-To: <2024090420-protozoan-clench-cca7@gregkh>
>> From: "Rafael J. Wysocki" <rafael.j.wysocki@intel.com>
>>
>> commit 3e999770ac1c7c31a70685dd5b88e89473509e9c upstream.
>>
>> Before commit 7839d0078e0d ("PM: sleep: Fix possible deadlocks in core
>> system-wide PM code"), the resume of devices that were allowed to resume
>> asynchronously was scheduled before starting the resume of the other
>> devices, so the former did not have to wait for the latter unless
>> functional dependencies were present.
>>
>> Commit 7839d0078e0d removed that optimization in order to address a
>> correctness issue, but it can be restored with the help of a new device
>> power management flag, so do that now.
>>
>> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
>> Reviewed-by: Stanislaw Gruszka <stanislaw.gruszka@linux.intel.com>
>> Signed-off-by: Yenchia Chen <yenchia.chen@mediatek.com>
>> ---
>> drivers/base/power/main.c | 117 +++++++++++++++++++++-----------------
>> include/linux/pm.h | 1 +
>> 2 files changed, 65 insertions(+), 53 deletions(-)
>Why does this need to be backported? What bug is it fixing?
>confused,
>greg k-h
Below is the scenario we met the issue:
1) use command 'echo 3 > /proc/sys/vm/drop_caches'
and enter suspending stage immediately.
2) power on device, our driver try to read mmc after leaving resume callback
and got stucked.
We found if we did not drop caches, mmc_blk_resume will be called and
system works fine.
If we drop caches before suspending, there is a high possibility that
mmc_blk_resume not be called and our driver stucked at filp_open.
We still try to find the root casue is but with this patch, it works.
Since it has been merged in mainline, we'd like to know it is ok to merge to stable.
next prev parent reply other threads:[~2024-09-05 9:36 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-09-02 9:32 [PATCH 6.6 0/1] pm, restore async device resume optimization Yenchia Chen
2024-09-02 9:32 ` [PATCH 6.6 1/1] PM: sleep: Restore asynchronous " Yenchia Chen
2024-09-04 14:19 ` Greg Kroah-Hartman
2024-09-05 9:34 ` Yenchia Chen [this message]
2024-09-05 9:38 ` Greg KH
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20240905093433.4798-1-yenchia.chen@mediatek.com \
--to=yenchia.chen@mediatek.com \
--cc=angelogioacchino.delregno@collabora.com \
--cc=gregkh@linuxfoundation.org \
--cc=len.brown@intel.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mediatek@lists.infradead.org \
--cc=linux-pm@vger.kernel.org \
--cc=matthias.bgg@gmail.com \
--cc=pavel@ucw.cz \
--cc=rafael.j.wysocki@intel.com \
--cc=rafael@kernel.org \
--cc=stable@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox