From: Bean Huo <beanhuo@iokpp.de>
To: Bart Van Assche <bvanassche@acm.org>,
alim.akhtar@samsung.com, avri.altman@wdc.com,
asutoshd@codeaurora.org, jejb@linux.ibm.com,
martin.petersen@oracle.com, stanley.chu@mediatek.com,
beanhuo@micron.com, tomas.winkler@intel.com, cang@codeaurora.org,
daejun7.park@samsung.com
Cc: linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v4 2/3] scsi: ufs: core: Cleanup ufshcd_slave_alloc()
Date: Tue, 25 Oct 2022 13:44:18 +0200 [thread overview]
Message-ID: <2f0141705b06339d31063c731b0511fc186364fd.camel@iokpp.de> (raw)
In-Reply-To: <1915c52f-0c76-0f90-97e9-0c27c36a9e1a@acm.org>
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
next prev parent reply other threads:[~2022-10-25 11:45 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-10-22 21:36 [PATCH v4 0/3] Changes for ufshcd.c Bean Huo
2022-10-22 21:36 ` [PATCH v4 1/3] scsi: ufs: core: Revert "WB is only available on LUN #0 to #7" Bean Huo
2022-10-23 9:45 ` Arthur Simchaev
2022-10-24 23:25 ` Bart Van Assche
2022-10-22 21:36 ` [PATCH v4 2/3] scsi: ufs: core: Cleanup ufshcd_slave_alloc() Bean Huo
2022-10-23 9:47 ` Arthur Simchaev
2022-10-24 23:25 ` Bart Van Assche
2022-10-25 11:44 ` Bean Huo [this message]
2022-10-25 13:36 ` Bart Van Assche
2022-10-25 13:36 ` Bart Van Assche
2022-10-22 21:36 ` [PATCH v4 3/3] scsi: ufs: core: Use is_visible to control UFS unit descriptor sysfs nodes Bean Huo
2022-10-23 9:47 ` Arthur Simchaev
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=2f0141705b06339d31063c731b0511fc186364fd.camel@iokpp.de \
--to=beanhuo@iokpp.de \
--cc=alim.akhtar@samsung.com \
--cc=asutoshd@codeaurora.org \
--cc=avri.altman@wdc.com \
--cc=beanhuo@micron.com \
--cc=bvanassche@acm.org \
--cc=cang@codeaurora.org \
--cc=daejun7.park@samsung.com \
--cc=jejb@linux.ibm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
--cc=martin.petersen@oracle.com \
--cc=stanley.chu@mediatek.com \
--cc=tomas.winkler@intel.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