lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <e1517d77307e4da0708003f847e456ba4831d9bf.camel@mediatek.com>
Date: Wed, 26 Jun 2024 03:52:03 +0000
From: Peter Wang (王信友) <peter.wang@...iatek.com>
To: "quic_rampraka@...cinc.com" <quic_rampraka@...cinc.com>,
	"quic_nitirawa@...cinc.com" <quic_nitirawa@...cinc.com>,
	"quic_nguyenb@...cinc.com" <quic_nguyenb@...cinc.com>,
	"quic_ziqichen@...cinc.com" <quic_ziqichen@...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 Tue, 2024-06-25 at 09:13 -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 8:38 PM, Peter Wang (王信友) wrote:
> > But ufshcd_scsi_block_requests usage is correct in SDR mode.
> 
> ufshcd_scsi_block_requests() uses scsi_block_requests(). It is almost
> never correct to use scsi_block_requests() in a blk-mq driver because
> scsi_block_requests() does not wait for ongoing request submission
> calls to complete. scsi_block_requests() is a legacy from the time
> when
> all request dispatching and queueing was protected by the SCSI host
> lock, a change that was made in 2010 or about 14 years ago. See also
> 
https://lore.kernel.org/linux-scsi/20101105002409.GA21714@havoc.gtf.org/
> 
> > 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.
> 
> ufshcd_wait_for_doorbell_clr() should be removed and 
> ufshcd_clock_scaling_prepare() should use blk_mq_freeze_*().
> See also my patch "ufs: Simplify the clock scaling mechanism
> implementation" from 5 years ago 
> (
> https://lore.kernel.org/linux-scsi/20191112173743.141503-5-bvanassche@acm.org/
> ).
> 
> Best regards,
> 
> Bart.

Hi Bart,

Yes, remove ufshcd_wait_for_doorbell_clr() is more reasonable if this
function cannot make sure all on-going request is done.

Thanks.
Peter

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ