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: <2f0141705b06339d31063c731b0511fc186364fd.camel@iokpp.de>
Date:   Tue, 25 Oct 2022 13:44:18 +0200
From:   Bean Huo <beanhuo@...pp.de>
To:     Bart Van Assche <bvanassche@....org>, alim.akhtar@...sung.com,
        avri.altman@....com, asutoshd@...eaurora.org, jejb@...ux.ibm.com,
        martin.petersen@...cle.com, stanley.chu@...iatek.com,
        beanhuo@...ron.com, tomas.winkler@...el.com, cang@...eaurora.org,
        daejun7.park@...sung.com
Cc:     linux-scsi@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v4 2/3] scsi: ufs: core: Cleanup ufshcd_slave_alloc()

On Mon, 2022-10-24 at 16:25 -0700, Bart Van Assche wrote:
> On 10/22/22 14:36, Bean Huo wrote:
> > +       u8 lun_qdepth = hba->nutrs;
> 
> How about changing this into hba->nutrs - 1 since one tag is reserved
> ('reserved_slot')?
> 
> Thanks,


Bart,

If having a look at 

scsi_change_queue_depth() {

  depth = min_t(int, depth, scsi_device_max_queue_depth(sdev));
	...
}

so the finnal depth per Lu is still 31.  I did test and debug, this is
true.



+set_qdepth:
+	/*
+	 * For WLUNs that don't support unit descriptor, queue depth
is set to 1. For LUs whose
+	 * bLUQueueDepth == 0, the queue depth is set to a maximum
value that host can queue.
+	 */
+	dev_dbg(hba->dev, "Set LU %x queue depth %d\n", lun,
lun_qdepth);
+	scsi_change_queue_depth(sdev, lun_qdepth); 



so lun_qdepth is 32, but scsi_change_queue_depth() will return 31,
since we set sdev->host->can_queue is 31.

If you need me to change the patch, let me know, it is no problem for
me to change to: 


u8 lun_qdepth = hba->nutrs - UFSHCD_NUM_RESERVED.

or

u8 lun_qdepth = UFSHCD_CMD_PER_LUN.


Kind regards,
Bean


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ