From: "Martin K. Petersen" <martin.petersen@oracle.com>
To: Mikulas Patocka <mpatocka@redhat.com>
Cc: Christoph Hellwig <hch@infradead.org>,
Jens Axboe <axboe@kernel.dk>, Alasdair Kergon <agk@redhat.com>,
Mike Snitzer <snitzer@kernel.org>,
Zdenek Kabelac <zkabelac@redhat.com>,
Milan Broz <gmazyland@gmail.com>,
linux-block@vger.kernel.org, dm-devel@lists.linux.dev
Subject: Re: [PATCH] blk-settings: round down io_opt to at least 4K
Date: Mon, 03 Feb 2025 14:02:41 -0500 [thread overview]
Message-ID: <yq1cyfykgng.fsf@ca-mkp.ca.oracle.com> (raw)
In-Reply-To: <e53588c8-77f0-5751-ad27-d6a3c4f88634@redhat.com> (Mikulas Patocka's message of "Mon, 3 Feb 2025 14:38:25 +0100 (CET)")
Hi Mikulas!
> The purpose of this patch is to avoid doing I/O not aligned on 4k
> boundary.
>
> The 512-byte value that some SSDs report is just lie.
So is 4K, though.
> Some USB-SATA bridges report optimal I/O size 33553920 bytes (that is
> 512*65535). If you connect a SATA SSD that reports 512-bytes physical
> sector size to this kind of USB-SATA bridge, the kernel will believe
> that the value 33553920 is valid optimal I/O size and it will attempt
> to align I/O to this boundary - the result will be that most of the
> I/O will not be aligned on 4k, causing performance degradation.
SCSI tries to make sure the characteristics reported by the device make
sense and are consistent with each other. If we encounter a device which
reports something incorrect despite passing the sanity checks, we quirk
it.
But I wonder why we're even reading the block limits if this is a USB
device?
--
Martin K. Petersen Oracle Linux Engineering
next prev parent reply other threads:[~2025-02-03 19:02 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-01-20 15:16 [PATCH] blk-settings: round down io_opt to at least 4K Mikulas Patocka
2025-01-22 6:12 ` Christoph Hellwig
2025-02-03 13:38 ` Mikulas Patocka
2025-02-03 19:02 ` Martin K. Petersen [this message]
2025-02-03 21:05 ` Mikulas Patocka
2025-02-04 3:30 ` Martin K. Petersen
2025-02-04 5:57 ` Christoph Hellwig
2025-02-04 13:02 ` Martin K. Petersen
2025-02-04 13:50 ` Christoph Hellwig
2025-02-05 2:36 ` Martin K. Petersen
2025-02-05 16:00 ` Christoph Hellwig
2025-02-04 14:56 ` Mikulas Patocka
2025-02-05 2:41 ` Martin K. Petersen
2025-02-10 12:54 ` Mikulas Patocka
2025-02-10 17:02 ` Milan Broz
2025-02-04 5:56 ` Christoph Hellwig
2025-02-04 5:55 ` Christoph Hellwig
2025-01-23 12:24 ` Milan Broz
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=yq1cyfykgng.fsf@ca-mkp.ca.oracle.com \
--to=martin.petersen@oracle.com \
--cc=agk@redhat.com \
--cc=axboe@kernel.dk \
--cc=dm-devel@lists.linux.dev \
--cc=gmazyland@gmail.com \
--cc=hch@infradead.org \
--cc=linux-block@vger.kernel.org \
--cc=mpatocka@redhat.com \
--cc=snitzer@kernel.org \
--cc=zkabelac@redhat.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.