[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <ee45ce9429b1f69147c1a01e07b050275b4009bf.camel@mediatek.com>
Date: Tue, 25 Jun 2024 03:38:57 +0000
From: Peter Wang (王信友) <peter.wang@...iatek.com>
To: "quic_rampraka@...cinc.com" <quic_rampraka@...cinc.com>,
"quic_nguyenb@...cinc.com" <quic_nguyenb@...cinc.com>,
"quic_ziqichen@...cinc.com" <quic_ziqichen@...cinc.com>,
"quic_nitirawa@...cinc.com" <quic_nitirawa@...cinc.com>, "beanhuo@...ron.com"
<beanhuo@...ron.com>, "avri.altman@....com" <avri.altman@....com>,
"bvanassche@....org" <bvanassche@....org>, "martin.petersen@...cle.com"
<martin.petersen@...cle.com>, "junwoo80.lee@...sung.com"
<junwoo80.lee@...sung.com>, "mani@...nel.org" <mani@...nel.org>,
"quic_cang@...cinc.com" <quic_cang@...cinc.com>
CC: "linux-scsi@...r.kernel.org" <linux-scsi@...r.kernel.org>,
"alim.akhtar@...sung.com" <alim.akhtar@...sung.com>, "jejb@...ux.ibm.com"
<jejb@...ux.ibm.com>, "quic_asutoshd@...cinc.com"
<quic_asutoshd@...cinc.com>, "quic_mnaresh@...cinc.com"
<quic_mnaresh@...cinc.com>, "manivannan.sadhasivam@...aro.org"
<manivannan.sadhasivam@...aro.org>, "linux-kernel@...r.kernel.org"
<linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] scsi: ufs: core: quiesce request queues before check
pending cmds
On Mon, 2024-06-24 at 09:29 -0700, Bart Van Assche wrote:
>
> External email : Please do not click links or open attachments until
> you have verified the sender or the content.
> On 6/24/24 2:56 AM, Ziqi Chen wrote:
> > 1. Why do we need to call blk_mq_quiesce_tagset() into
> > ufshcd_scsi_block_requests() instead directly replace all
> > ufshcd_scsi_block_requests() with blk_mq_quiesce_tagset()?
>
> Because ufshcd_scsi_block_requests() has more callers than the clock
> scaling code and because all callers of ufshcd_scsi_block_requests()
> should be fixed.
>
> > 2. This patch need to to do long-term stress test, I think many
> OEMs
> > can't wait as it is a blocker issue for them.
> Patch "scsi: ufs: core: Quiesce request queues before checking
> pending
> cmds" is already in Linus' master branch. I will rebase my patch on
> top
> of linux-next.
>
> Best regards,
>
> Bart.
Hi Bart,
But ufshcd_scsi_block_requests usage is correct in SDR mode.
So, I don't think it is ufshcd_scsi_block_requests bug.
Actually. this bug is triggered by this patch.
8d077ede48c1 ("scsi: ufs: core: scsi: ufs: Optimize the command
queueing code")
Which after ufshcd_scsi_block_requests, ufs cannot make sure ongoing
request
is all completed by ufshcd_wait_for_doorbell_clr.
That is means, it is ufshcd_wait_for_doorbell_clr bug.
So, I think ufshcd_wait_for_doorbell_clr should be revise.
Check tr_doorbell in SDR mode. (before 8d077ede48c1 do)
Check each HWQ's are all empty in MCQ mode. (need think how to do)
Make sure all requests is complete, and finish this function' job
correctly.
Or there still have a gap in ufshcd_wait_for_doorbell_clr.
And someday somebody's patch may stepping into it in the future.
Thanks.
Peter
Powered by blists - more mailing lists