From: "Peter Wang (王信友)" <peter.wang@mediatek.com>
To: "bvanassche@acm.org" <bvanassche@acm.org>,
"martin.petersen@oracle.com" <martin.petersen@oracle.com>
Cc: "beanhuo@micron.com" <beanhuo@micron.com>,
"vamshigajjela@google.com" <vamshigajjela@google.com>,
"chu.stanley@gmail.com" <chu.stanley@gmail.com>,
"alok.a.tiwari@oracle.com" <alok.a.tiwari@oracle.com>,
"quic_nguyenb@quicinc.com" <quic_nguyenb@quicinc.com>,
"linux-scsi@vger.kernel.org" <linux-scsi@vger.kernel.org>,
"chenyuan0y@gmail.com" <chenyuan0y@gmail.com>,
"alim.akhtar@samsung.com" <alim.akhtar@samsung.com>,
"ping.gao@samsung.com" <ping.gao@samsung.com>,
"rafael.j.wysocki@intel.com" <rafael.j.wysocki@intel.com>,
"avri.altman@sandisk.com" <avri.altman@sandisk.com>,
"James.Bottomley@HansenPartnership.com"
<James.Bottomley@HansenPartnership.com>,
"can.guo@oss.qualcomm.com" <can.guo@oss.qualcomm.com>,
"adrian.hunter@intel.com" <adrian.hunter@intel.com>
Subject: Re: [PATCH 1/3] ufs: core: Fix ufshcd_mcq_force_compl_one()
Date: Tue, 31 Mar 2026 09:41:53 +0000 [thread overview]
Message-ID: <4685d17dbf09397aef70c2e2b84ee13f1c48d4cd.camel@mediatek.com> (raw)
In-Reply-To: <20260330183311.1941942-2-bvanassche@acm.org>
On Mon, 2026-03-30 at 11:33 -0700, Bart Van Assche wrote:
> There are two issues with the code in
> ufshcd_mcq_compl_all_cqes_lock():
> - The completion queue is processed without checking first whether it
> is
> empty.
>
Hi Bart,
Does ufshcd_mcq_compl_all_cqes_lock not check whether the CQ
is empty because there could be cases where the CQ is empty
but there are still ongoing requests?
>
> @@ -5855,7 +5855,7 @@ static bool ufshcd_mcq_force_compl_one(struct
> request *rq, void *priv)
> if (blk_mq_is_reserved_rq(rq) || !hwq)
> return true;
>
> - ufshcd_mcq_compl_all_cqes_lock(hba, hwq);
> + ufshcd_mcq_poll_cqe_lock(hba, hwq);
>
>
Since ufshcd_mcq_force_compl_one and ufshcd_mcq_compl_one
are very similar, would it be possible to merge them into
one function, with a parameter to handle the force completion
case?
Thanks.
Peter
next prev parent reply other threads:[~2026-03-31 9:42 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-30 18:33 [PATCH 0/3] Reduce interrupt latency Bart Van Assche
2026-03-30 18:33 ` [PATCH 1/3] ufs: core: Fix ufshcd_mcq_force_compl_one() Bart Van Assche
2026-03-31 9:41 ` Peter Wang (王信友) [this message]
2026-03-31 19:29 ` Bart Van Assche
2026-04-01 13:10 ` Peter Wang (王信友)
2026-04-01 15:51 ` Bart Van Assche
2026-04-02 7:19 ` Peter Wang (王信友)
2026-03-30 18:33 ` [PATCH 2/3] ufs: core: Introduce ufshcd_mcq_poll_cqe_lock_n() Bart Van Assche
2026-03-31 9:43 ` Peter Wang (王信友)
2026-03-31 19:31 ` Bart Van Assche
2026-04-01 13:11 ` Peter Wang (王信友)
2026-04-01 15:51 ` Bart Van Assche
2026-04-02 7:20 ` Peter Wang (王信友)
2026-03-30 18:33 ` [PATCH 3/3] ufs: qcom: Reduce interrupt latency Bart Van Assche
2026-03-31 7:09 ` Manivannan Sadhasivam
2026-03-31 19:44 ` Bart Van Assche
2026-04-04 3:11 ` Manivannan Sadhasivam
2026-04-06 16:02 ` Bart Van Assche
2026-03-30 18:36 ` [PATCH 0/3] " Bart Van Assche
2026-03-31 2:01 ` Can Guo
2026-04-07 8:20 ` Xiaosen
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=4685d17dbf09397aef70c2e2b84ee13f1c48d4cd.camel@mediatek.com \
--to=peter.wang@mediatek.com \
--cc=James.Bottomley@HansenPartnership.com \
--cc=adrian.hunter@intel.com \
--cc=alim.akhtar@samsung.com \
--cc=alok.a.tiwari@oracle.com \
--cc=avri.altman@sandisk.com \
--cc=beanhuo@micron.com \
--cc=bvanassche@acm.org \
--cc=can.guo@oss.qualcomm.com \
--cc=chenyuan0y@gmail.com \
--cc=chu.stanley@gmail.com \
--cc=linux-scsi@vger.kernel.org \
--cc=martin.petersen@oracle.com \
--cc=ping.gao@samsung.com \
--cc=quic_nguyenb@quicinc.com \
--cc=rafael.j.wysocki@intel.com \
--cc=vamshigajjela@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