From: "hoyoung seo" <hy50.seo@samsung.com>
To: "'Bart Van Assche'" <bvanassche@acm.org>,
<linux-scsi@vger.kernel.org>, <linux-kernel@vger.kernel.org>,
<mkp@kernel.org>, <martin.petersen@oracle.com>,
<stanleyjhu@google.com>, <alim.akhtar@samsung.com>,
<kwangwon.min@samsung.com>, <kwmad.kim@samsung.com>,
<cpgs@samsung.com>, <h10.kim@samsung.com>
Subject: RE: [PATCH v7 3/3] scsi: ufs: core: Limit early link recovery in the error handler to runtime PM
Date: Mon, 9 Nov 2026 13:11:23 +0900 [thread overview]
Message-ID: <024201dd7000$61f0b9e0$25d22da0$@samsung.com> (raw)
In-Reply-To: <2ac84978-3223-44b7-af80-de59def8a0f1@acm.org>
Hi Bart,
Thank you for the review and for the Reviewed-by on patch 2.
> Has it been considered to use the runtime PM status maintained by the
> PM core instead of introducing a new member variable?
I had not, and it is a good idea. In v8 the error handler checks
whether the runtime status of the WLUN is RPM_SUSPENDING or
RPM_RESUMING, read with READ_ONCE() without power.lock, and the new
member and its updates in ufshcd_wl_runtime_suspend() and
ufshcd_wl_runtime_resume() are gone. runtime_status only exists with
CONFIG_PM and pm_runtime.h has no helper for these two states, so I put
the check into a small helper next to the other ufshcd_rpm_*() helpers
in ufshcd-priv.h that returns false without CONFIG_PM.
Thanks,
Hoyoung
> -----Original Message-----
> From: Bart Van Assche <bvanassche@acm.org>
> Sent: Saturday, November 7, 2026 6:58 AM
> To: HOYOUNG SEO <hy50.seo@samsung.com>; linux-scsi@vger.kernel.org; linux-
> kernel@vger.kernel.org; mkp@kernel.org; martin.petersen@oracle.com;
> stanleyjhu@google.com; alim.akhtar@samsung.com; kwangwon.min@samsung.com;
> kwmad.kim@samsung.com; cpgs@samsung.com; h10.kim@samsung.com
> Subject: Re: [PATCH v7 3/3] scsi: ufs: core: Limit early link recovery in
> the error handler to runtime PM
>
> On 11/5/26 10:11 PM, HOYOUNG SEO wrote:
> > ufshcd_rpm_get_noresume(hba);
> > - if (hba->pm_op_in_progress) {
> > + if (READ_ONCE(hba->runtime_pm_in_progress)) {
> > ufshcd_link_recovery(hba);
> > ufshcd_rpm_put(hba);
> > return;
>
> Has it been considered to use the runtime PM status maintained by the PM
> core instead of introducing a new member variable? While
> ufshcd_wl_runtime_suspend() or ufshcd_wl_runtime_resume() is running,
> hba->ufs_device_wlun->sdev_gendev.power.runtime_status is either
> RPM_SUSPENDING or RPM_RESUMING. During system PM it is either RPM_ACTIVE
> or RPM_SUSPENDED. Reading runtime_status without holding power.lock is not
> more racy than reading the new flag.
>
> Thanks,
>
> Bart.
prev parent reply other threads:[~2026-11-09 4:11 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <CGME20261106061544epcas2p4b1ebab9e2c0e041ee52ff724caf8a9e8@epcas2p4.samsung.com>
2026-11-06 6:11 ` [PATCH v7 0/3] scsi: ufs: core: Avoid redundant link recovery from the error handler during PM HOYOUNG SEO
[not found] ` <CGME20261106061545epcas2p2e16985621e8852e675e5a557857dca54@epcas2p2.samsung.com>
2026-11-06 6:11 ` [PATCH v7 1/3] scsi: ufs: core: Clear saved errors in ufshcd_link_recovery() HOYOUNG SEO
[not found] ` <CGME20261106061546epcas2p3b0d54ffe9fcea407f7d0e27ed579de0d@epcas2p3.samsung.com>
2026-11-06 6:11 ` [PATCH v7 2/3] scsi: ufs: core: Hold host_sem in ufshcd_wl_poweroff() HOYOUNG SEO
2026-11-06 21:56 ` Bart Van Assche
[not found] ` <CGME20261106061547epcas2p40541421c139d758cdc3633302634d29b@epcas2p4.samsung.com>
2026-11-06 6:11 ` [PATCH v7 3/3] scsi: ufs: core: Limit early link recovery in the error handler to runtime PM HOYOUNG SEO
2026-11-06 21:57 ` Bart Van Assche
2026-11-09 4:11 ` hoyoung seo [this message]
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='024201dd7000$61f0b9e0$25d22da0$@samsung.com' \
--to=hy50.seo@samsung.com \
--cc=alim.akhtar@samsung.com \
--cc=bvanassche@acm.org \
--cc=cpgs@samsung.com \
--cc=h10.kim@samsung.com \
--cc=kwangwon.min@samsung.com \
--cc=kwmad.kim@samsung.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
--cc=martin.petersen@oracle.com \
--cc=mkp@kernel.org \
--cc=stanleyjhu@google.com \
/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
all inboxes | Powered by JetHome®