From: "정요한(JOUNG YOHAN) Mobile SE" <yohan.joung@sk.com>
To: Bart Van Assche <bvanassche@acm.org>,
"Martin K . Petersen" <martin.petersen@oracle.com>
Cc: Jaegeuk Kim <jaegeuk@kernel.org>,
"linux-scsi@vger.kernel.org" <linux-scsi@vger.kernel.org>,
Adrian Hunter <adrian.hunter@intel.com>,
"Avri Altman" <avri.altman@wdc.com>,
Bean Huo <beanhuo@micron.com>,
Stanley Chu <stanley.chu@mediatek.com>,
"James E.J. Bottomley" <jejb@linux.ibm.com>,
Matthias Brugger <matthias.bgg@gmail.com>
Subject: RE: [PATCH v3] scsi: ufs: Increase the maximum data buffer size
Date: Tue, 2 Aug 2022 23:40:45 +0000 [thread overview]
Message-ID: <55fce3baaabf4e33aeaccbe5b4e1f145@sk.com> (raw)
In-Reply-To: <20220726225232.1362251-1-bvanassche@acm.org>
Hi bart
Is it possible by adding only max_sector to increase the data buffer size?
I think the data buffer will split to 512 KiB, because the sg_table size is SG_ALL
Thanks,
yohan
> -----Original Message-----
> From: Bart Van Assche <bvanassche@acm.org>
> Sent: Wednesday, July 27, 2022 7:52 AM
> To: Martin K . Petersen <martin.petersen@oracle.com>
> Cc: Jaegeuk Kim <jaegeuk@kernel.org>; linux-scsi@vger.kernel.org; Adrian
> Hunter <adrian.hunter@intel.com>; Bart Van Assche <bvanassche@acm.org>;
> Avri Altman <avri.altman@wdc.com>; Bean Huo <beanhuo@micron.com>; Stanley
> Chu <stanley.chu@mediatek.com>; James E.J. Bottomley <jejb@linux.ibm.com>;
> Matthias Brugger <matthias.bgg@gmail.com>
> Subject: [PATCH v3] scsi: ufs: Increase the maximum data buffer size
>
> Measurements for one particular UFS controller + UFS device show a 25%
> higher read bandwidth if the maximum data buffer size is increased from
> 512 KiB to 1 MiB. Hence increase the maximum size of the data buffer
> associated with a single request from SCSI_DEFAULT_MAX_SECTORS (1024)
> * 512 bytes = 512 KiB to 1 MiB.
>
> Notes:
> - The maximum data buffer size supported by the UFSHCI specification
> is 65535 * 256 KiB or about 16 GiB.
> - The maximum data buffer size for READ(10) commands is 65535 logical
> blocks. To transfer more than 65535 * 4096 bytes = 255 MiB with a
> single SCSI command, the READ(16) command is required. Support for
> READ(16) is optional in the UFS 3.1 and UFS 4.0 standards.
>
> Cc: Adrian Hunter <adrian.hunter@intel.com>
> Cc: Avri Altman <avri.altman@wdc.com>
> Cc: Bean Huo <beanhuo@micron.com>
> Cc: Stanley Chu <stanley.chu@mediatek.com>
> Signed-off-by: Bart Van Assche <bvanassche@acm.org>
> ---
> Changes compared to v2: changed maximum transfer size 255 MiB to 1 MiB.
> Changes compared to v1: changed maximum transfer size from 1 GiB to 255 MiB.
>
> drivers/ufs/core/ufshcd.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/drivers/ufs/core/ufshcd.c b/drivers/ufs/core/ufshcd.c index
> 36b7212e9cb5..678bc8d6d6aa 100644
> --- a/drivers/ufs/core/ufshcd.c
> +++ b/drivers/ufs/core/ufshcd.c
> @@ -8365,6 +8365,7 @@ static struct scsi_host_template
> ufshcd_driver_template = {
> .cmd_per_lun = UFSHCD_CMD_PER_LUN,
> .can_queue = UFSHCD_CAN_QUEUE,
> .max_segment_size = PRDT_DATA_BYTE_COUNT_MAX,
> + .max_sectors = (1 << 20) / SECTOR_SIZE, /* 1 MiB */
> .max_host_blocked = 1,
> .track_queue_depth = 1,
> .sdev_groups = ufshcd_driver_groups,
next prev parent reply other threads:[~2022-08-02 23:56 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-07-26 22:52 [PATCH v3] scsi: ufs: Increase the maximum data buffer size Bart Van Assche
2022-07-27 5:06 ` Avri Altman
2022-08-01 23:28 ` Martin K. Petersen
2022-08-02 23:40 ` 정요한(JOUNG YOHAN) Mobile SE [this message]
2022-08-03 16:23 ` Bart Van Assche
2022-08-04 1:50 ` 정요한(JOUNG YOHAN) Mobile SE
2022-08-04 17:48 ` Bart Van Assche
2022-08-05 1:54 ` 정요한(JOUNG YOHAN) Mobile SE
2022-09-02 14:52 ` Bean Huo
2022-09-06 18:04 ` Bart Van Assche
2022-09-15 10:56 ` Bean Huo
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=55fce3baaabf4e33aeaccbe5b4e1f145@sk.com \
--to=yohan.joung@sk.com \
--cc=adrian.hunter@intel.com \
--cc=avri.altman@wdc.com \
--cc=beanhuo@micron.com \
--cc=bvanassche@acm.org \
--cc=jaegeuk@kernel.org \
--cc=jejb@linux.ibm.com \
--cc=linux-scsi@vger.kernel.org \
--cc=martin.petersen@oracle.com \
--cc=matthias.bgg@gmail.com \
--cc=stanley.chu@mediatek.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.