From: "Martin K. Petersen" <martin.petersen@oracle.com>
To: John Pittman <jpittman@redhat.com>
Cc: axboe@kernel.dk, djeffery@redhat.com, loberman@redhat.com,
emilne@redhat.com, minlei@redhat.com,
linux-block@vger.kernel.org
Subject: Re: [PATCH] block: set reasonable default for discard max
Date: Fri, 09 Jun 2023 14:46:48 -0400 [thread overview]
Message-ID: <yq1legs1nns.fsf@ca-mkp.ca.oracle.com> (raw)
In-Reply-To: <20230609180805.736872-1-jpittman@redhat.com> (John Pittman's message of "Fri, 9 Jun 2023 14:08:05 -0400")
John,
> Some drive manufacturers export a very large supported max discard
> size. However, when the operating system sends I/O of the max size to
> the device, extreme I/O latency can often be encountered. Since
> hardware does not provide an optimal discard value in addition to the
> max, and there is no way to foreshadow how well a drive handles the
> large size, take the method from max_sectors setting, and use
> BLK_DEF_MAX_SECTORS to set a more reasonable default discard max. This
> should avoid the extreme latency while still allowing the user to
> increase the value for specific needs.
What's reasonable for one device may be completely unreasonable for
another. 4 * BLK_DEF_MAX_SECTORS is *tiny* and will penalize performance
on many devices.
If there's a problem with a device returning something that doesn't make
sense, let's quirk it.
--
Martin K. Petersen Oracle Linux Engineering
next prev parent reply other threads:[~2023-06-09 18:47 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-06-09 18:08 [PATCH] block: set reasonable default for discard max John Pittman
2023-06-09 18:46 ` Martin K. Petersen [this message]
2023-06-10 0:22 ` John Pittman
2023-06-10 22:52 ` Chaitanya Kulkarni
2023-06-13 0:55 ` Martin K. Petersen
2023-06-13 11:23 ` Ewan Milne
2023-06-13 1:37 ` Ming Lei
2023-06-19 16:02 ` John Pittman
2023-06-20 15:06 ` Martin K. Petersen
2023-07-14 17:15 ` John Pittman
2023-07-20 1:58 ` Martin K. Petersen
2023-07-20 14:43 ` John Pittman
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=yq1legs1nns.fsf@ca-mkp.ca.oracle.com \
--to=martin.petersen@oracle.com \
--cc=axboe@kernel.dk \
--cc=djeffery@redhat.com \
--cc=emilne@redhat.com \
--cc=jpittman@redhat.com \
--cc=linux-block@vger.kernel.org \
--cc=loberman@redhat.com \
--cc=minlei@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox