Re: [PATCH] scsi: ufs: core: quiesce request queues before check pending cmds

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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




 




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]

  Powered by Linux