Linux block layer
 help / color / mirror / Atom feed
From: "Martin K. Petersen" <martin.petersen@oracle.com>
To: John Pittman <jpittman@redhat.com>
Cc: "Martin K. Petersen" <martin.petersen@oracle.com>,
	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: Mon, 12 Jun 2023 20:55:46 -0400	[thread overview]
Message-ID: <yq14jnc18y0.fsf@ca-mkp.ca.oracle.com> (raw)
In-Reply-To: <CA+RJvhzPfmjD0FZxWS5gFeZJWKki5OcdmywZdngqhgSjm6wiFA@mail.gmail.com> (John Pittman's message of "Fri, 9 Jun 2023 20:22:31 -0400")


John,

> Thanks alot for responding Martin.  Forgive my ignorance; just trying
> to gain understanding.  For example, if we find a device with a 2TiB
> max discard (way too high for any device to handle reasonably from
> what I've seen),

That really depends. On some devices performing a 2TB discard may just
involve updating a few entries in a block translation table. It could be
close to constant time regardless of the number of terabytes unmapped.

> and we make a quirk for it that brings the max discard down, how do we
> decide what value to bring that down to? Would we ask the hardware
> vendor for an optimal value? Is there some way we could decide the
> value?

The best thing would be to ask the vendor. Or maybe if you provide the
output of

# sg_vpd -p bl /dev/sdN

and we can try to see if we can come up with a suitable heuristic for a
quirk.

-- 
Martin K. Petersen	Oracle Linux Engineering

  parent reply	other threads:[~2023-06-13  0:56 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
2023-06-10  0:22   ` John Pittman
2023-06-10 22:52     ` Chaitanya Kulkarni
2023-06-13  0:55     ` Martin K. Petersen [this message]
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=yq14jnc18y0.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