From: Bean Huo <huobean@gmail.com>
To: Bart Van Assche <bvanassche@acm.org>,
"yohan.joung@sk.com" <yohan.joung@sk.com>,
"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: Fri, 02 Sep 2022 16:52:00 +0200 [thread overview]
Message-ID: <ea43b861ac1c7b87a11934d2e5606fa37b2ae7fe.camel@gmail.com> (raw)
In-Reply-To: <6263c2a5-e7b6-c9e5-69e8-b6d93604d82d@acm.org>
On Wed, 2022-08-03 at 09:23 -0700, Bart Van Assche wrote:
> On 8/2/22 16:40, yohan.joung@sk.com wrote:
> > Is it possible by adding only max_sector to increase the data
> > buffer size?
>
> Yes.
>
> > I think the data buffer will split to 512 KiB, because the sg_table
> > size is SG_ALL
>
> I don't think so. With this patch applied, the limits supported by
> the
> UFS driver are as follows:
>
> .sg_tablesize = SG_ALL, /* 128 */
> .max_segment_size = PRDT_DATA_BYTE_COUNT_MAX, /* 256
> KiB*/
> .max_sectors = (1 << 20) / SECTOR_SIZE, /* 1 MiB
> */
>
> So the maximum data buffer size is min(max_sectors * 512,
> sg_tablesize *
> max_segment_size) = min(1 MiB, 128 * 256 KiB) = 1 MiB. On a system
> with
> 4 KiB pages, the data buffer size will be 128 * 4 KiB = 512 MiB if
> none
> of the pages involved in the I/O are contiguous.
>
> Bart.
Bart,
This change just increases the shost->max_sectors limit from 501KB to
1Mb, but the final value will be overridden by the optimal transfer
length defined in the VPD, right?
Kind regards,
Bean
next prev parent reply other threads:[~2022-09-02 15:19 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
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 [this message]
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=ea43b861ac1c7b87a11934d2e5606fa37b2ae7fe.camel@gmail.com \
--to=huobean@gmail.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 \
--cc=yohan.joung@sk.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