linux-xfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Eric Sandeen <sandeen@sandeen.net>
To: Dave Chinner <david@fromorbit.com>, Pavel Reichl <preichl@redhat.com>
Cc: linux-xfs@vger.kernel.org, "Lukáš Czerner" <lczerner@redhat.com>
Subject: Re: [PATCH 1/2] mkfs: Break block discard into chunks of 2 GB
Date: Tue, 26 Nov 2019 13:40:16 -0600	[thread overview]
Message-ID: <5a5903bc-a237-5fa1-0afb-af9565c44ae2@sandeen.net> (raw)
In-Reply-To: <65693048-54db-3605-2c13-85e06420ba69@sandeen.net>

On 11/22/19 3:30 PM, Eric Sandeen wrote:
> On 11/22/19 3:10 PM, Eric Sandeen wrote:
>> On 11/21/19 5:18 PM, Dave Chinner wrote:
>>> On Thu, Nov 21, 2019 at 10:44:44PM +0100, Pavel Reichl wrote:
>>>> Signed-off-by: Pavel Reichl <preichl@redhat.com>
>>>> ---
>>>
>>> This is mixing an explanation about why the change is being made
>>> and what was considered when making decisions about the change.
>>>
>>> e.g. my first questions on looking at the patch were:
>>>
>>> 	- why do we need to break up the discards into 2GB chunks?
>>> 	- why 2GB?
>>> 	- why not use libblkid to query the maximum discard size
>>> 	  and use that as the step size instead?
>>
>> Just wondering, can we trust that to be reasonably performant?
>> (the whole motivation here is for hardware that takes inordinately
>> long to do discard, I wonder if we can count on such hardware to
>> properly fill out this info....)
> 
> Looking at the docs in kernel/Documentation/block/queue-sysfs.rst:
> 
> discard_max_hw_bytes (RO)
> -------------------------
> Devices that support discard functionality may have internal limits on
> the number of bytes that can be trimmed or unmapped in a single operation.
> The discard_max_bytes parameter is set by the device driver to the maximum
> number of bytes that can be discarded in a single operation. Discard
> requests issued to the device must not exceed this limit. A discard_max_bytes
> value of 0 means that the device does not support discard functionality.
> 
> discard_max_bytes (RW)
> ----------------------
> While discard_max_hw_bytes is the hardware limit for the device, this
> setting is the software limit. Some devices exhibit large latencies when
> large discards are issued, setting this value lower will make Linux issue
> smaller discards and potentially help reduce latencies induced by large
> discard operations.
> 
> it seems like a strong suggestion that the discard_max_hw_bytes value may
> still be problematic, and discard_max_bytes can be hand-tuned to something
> smaller if it's a problem.  To me that indicates that discard_max_hw_bytes
> probably can't be trusted to be performant, and presumably discard_max_bytes
> won't be either in that case unless it's been hand-tuned by the admin?

Lukas, Jeff Moyer reminded me that you did a lot of investigation into this
behavior a while back.  Can you shed light on this, particularly how you
chose 2G as the discard granularity for mke2fs?

Thanks,
-Eric

  reply	other threads:[~2019-11-26 19:40 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-11-21 21:44 [PATCH 0/2] mkfs: inform during block discarding Pavel Reichl
2019-11-21 21:44 ` [PATCH 1/2] mkfs: Break block discard into chunks of 2 GB Pavel Reichl
2019-11-21 21:55   ` Darrick J. Wong
2019-11-22 14:46     ` Pavel Reichl
2019-11-22 21:07     ` Eric Sandeen
2019-11-21 23:18   ` Dave Chinner
2019-11-22 15:38     ` Darrick J. Wong
2019-11-22 15:59       ` Pavel Reichl
2019-11-22 21:00         ` Dave Chinner
2019-11-22 16:09     ` Pavel Reichl
2019-11-22 21:10     ` Eric Sandeen
2019-11-22 21:30       ` Eric Sandeen
2019-11-26 19:40         ` Eric Sandeen [this message]
2019-11-26 20:53   ` Eric Sandeen
2019-11-21 21:44 ` [PATCH 2/2] mkfs: Show progress during block discard Pavel Reichl
2019-11-21 21:59   ` Darrick J. Wong
2019-11-22 16:27     ` Pavel Reichl
2019-11-22 16:31       ` Darrick J. Wong
2019-11-21 23:41   ` Dave Chinner
2019-11-22 16:43     ` Pavel Reichl
2019-11-22 21:11       ` Dave Chinner
2019-11-22 21:19       ` Eric Sandeen

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=5a5903bc-a237-5fa1-0afb-af9565c44ae2@sandeen.net \
    --to=sandeen@sandeen.net \
    --cc=david@fromorbit.com \
    --cc=lczerner@redhat.com \
    --cc=linux-xfs@vger.kernel.org \
    --cc=preichl@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;
as well as URLs for NNTP newsgroup(s).