From: "Martin K. Petersen" <martin.petersen@oracle.com>
To: bvanassche@acm.org, beanhuo@micron.com, peter.wang@mediatek.com,
mani@kernel.org, Can Guo <can.guo@oss.qualcomm.com>
Cc: "Martin K . Petersen" <martin.petersen@oracle.com>,
linux-scsi@vger.kernel.org, Alim Akhtar <alim.akhtar@samsung.com>,
"James E.J. Bottomley" <James.Bottomley@HansenPartnership.com>,
linux-kernel@vger.kernel.org,
Avri Altman <avri.altman@sandisk.com>
Subject: Re: [PATCH v2] scsi: ufs: core: Avoid possible memory reclaim deadlock in TX EQTR context
Date: Tue, 28 Jul 2026 22:54:58 -0400 [thread overview]
Message-ID: <178508193499.4027291.4053528994945733332.b4-ty@oracle.com> (raw)
In-Reply-To: <20260618140941.902000-1-can.guo@oss.qualcomm.com>
On Thu, 18 Jun 2026 07:09:29 -0700, Can Guo wrote:
> TX EQTR may run while devfreq gear scaling has quiesced the UFS tagset. In
> that context, functions ufshcd_tx_eqtr(), __ufshcd_tx_eqtr() and
> ufs_qcom_get_rx_fom() allocate memory with GFP_KERNEL. If direct reclaim
> is triggered, reclaim/writeback can depend on I/O to UFS device. Because
> the queue is quiesced, this can cause deadlock.
>
> Use memalloc_noio_save/restore() in ufshcd_tx_eqtr() to cover all
> allocations in the TX EQTR call tree, including:
> - params->eqtr_record in ufshcd_tx_eqtr()
> - eqtr_data in __ufshcd_tx_eqtr()
> - params in ufs_qcom_get_rx_fom()
>
> [...]
Applied to 7.3/scsi-queue, thanks!
[1/1] scsi: ufs: core: Avoid possible memory reclaim deadlock in TX EQTR context
https://git.kernel.org/mkp/scsi/c/760fc6f0e25a
--
Martin K. Petersen
prev parent reply other threads:[~2026-07-29 2:55 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-06-18 14:09 Can Guo
2026-07-02 7:27 ` Ziqi Chen
2026-07-06 14:09 ` Bart Van Assche
2026-07-06 15:44 ` Manivannan Sadhasivam
2026-07-12 18:02 ` Martin K. Petersen
2026-07-29 2:54 ` Martin K. Petersen [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=178508193499.4027291.4053528994945733332.b4-ty@oracle.com \
--to=martin.petersen@oracle.com \
--cc=James.Bottomley@HansenPartnership.com \
--cc=alim.akhtar@samsung.com \
--cc=avri.altman@sandisk.com \
--cc=beanhuo@micron.com \
--cc=bvanassche@acm.org \
--cc=can.guo@oss.qualcomm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
--cc=mani@kernel.org \
--cc=peter.wang@mediatek.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®