From: Bart Van Assche <bvanassche@acm.org>
To: Damien Le Moal <dlemoal@kernel.org>,
"Martin K . Petersen" <martin.petersen@oracle.com>,
linux-scsi@vger.kernel.org
Subject: Re: [PATCH v3 2/2] scsi: sd: Set a default optimal IO size if one is not defined
Date: Thu, 12 Jun 2025 08:55:45 -0700 [thread overview]
Message-ID: <a1f8c56b-3cf4-49db-952b-49a6586bce9b@acm.org> (raw)
In-Reply-To: <20250612060211.1970933-3-dlemoal@kernel.org>
On 6/11/25 11:02 PM, Damien Le Moal wrote:
> Introduce the helper function sd_set_io_opt() to set a disk io_opt
> limit. This new way of setting this limit falls back to using the
> max_sectors limit if the host does not define an optimal sector limit
> and the device did not indicate an optimal transfer size (e.g. as is
> the case for ATA devices). io_opt calculation is done using a local
> 64-bits variable to avoid overflows. The final value is clamped to
> UINT_MAX aligned down to the device physical block size.
>
> This fallback io_opt limit avoids setting up the disk with a zero
> io_opt limit, which result in the rather small 128 KB read_ahead_kb
> attribute. The larger read_ahead_kb value set with the default non-zero
> io_opt limit significantly improves buffered read performance with file
> systems without any intervention from the user.
Reviewed-by: Bart Van Assche <bvanassche@acm.org>
prev parent reply other threads:[~2025-06-12 15:55 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-06-12 6:02 [PATCH v3 0/2] Improve optimal IO size initialization Damien Le Moal
2025-06-12 6:02 ` [PATCH v3 1/2] scsi: sd: Prevent logical_to_bytes() from returning overflowed values Damien Le Moal
2025-06-12 15:53 ` Bart Van Assche
2025-06-13 5:55 ` Damien Le Moal
2025-06-12 6:02 ` [PATCH v3 2/2] scsi: sd: Set a default optimal IO size if one is not defined Damien Le Moal
2025-06-12 15:55 ` Bart Van Assche [this message]
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=a1f8c56b-3cf4-49db-952b-49a6586bce9b@acm.org \
--to=bvanassche@acm.org \
--cc=dlemoal@kernel.org \
--cc=linux-scsi@vger.kernel.org \
--cc=martin.petersen@oracle.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;
as well as URLs for NNTP newsgroup(s).