From: Qu Wenruo <quwenruo.btrfs@gmx.com>
To: David Disseldorp <ddiss@suse.de>, Eric Levy <contact@ericlevy.name>
Cc: "linux-btrfs@vger.kernel.org" <linux-btrfs@vger.kernel.org>
Subject: Re: "hardware-assisted zeroing"
Date: Mon, 3 Jan 2022 19:57:39 +0800 [thread overview]
Message-ID: <409d6824-bf81-111e-286d-e004025b25c2@gmx.com> (raw)
In-Reply-To: <20220103124607.524882f8@suse.de>
On 2022/1/3 19:46, David Disseldorp wrote:
> On Mon, 03 Jan 2022 06:08:46 -0500, Eric Levy wrote:
>
>> I am operating a Btrfs file system on logical volumes provided through
>> an iSCSI target. The software managing the volumes shows that they are
>> configured for certain features, which include "hardware-assisted
>> zeroing" and "space reclamation". Presumably the meaning of these
>> features, at least the former, is that a file system, with support of
>> the kernel, may issue a SCSI command indicating that a region of a
>> block device would be cleared. For a file system, such an operation has
>> no direct value, because the contents of de-allocated space is
>> irrelevant, but for a logical volume, it creates an opportunity to free
>> space on the underlying file system on the back end.
>>
>> I have searched the term "hardware-assisted zeroing", without finding
>> any useful resources on the application of the term.
>
> "hardware-assisted zeroing" is often marketing speak for the WRITE SAME
> SCSI command, which is used by VMFS. I'm not aware of any Linux
> filesystems which make use of it.
Thanks for pointing this out, really not familiar with WRITE SAME command.
After some quick search, it looks like it's kinda of hole punching for
SCSI command set.
Then I guess that explains why Linux filesystems don't really make use
of it.
If we want a large zeroed file, both hole punching and fallocate will be
faster, and we don't need to issue any data IO.
All data read will be zeroed at read time. No IO is always faster than
any IO, even if it's "hardware-assisted".
Thanks,
Qu
>
> As Qu mentioned, "space reclamation" would refer to UNMAP / discard.
>
> Cheers, David
prev parent reply other threads:[~2022-01-03 11:57 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-01-03 11:08 "hardware-assisted zeroing" Eric Levy
2022-01-03 11:17 ` Qu Wenruo
2022-01-03 11:24 ` Eric Levy
2022-01-03 11:51 ` Qu Wenruo
2022-01-04 10:50 ` Eric Levy
2022-01-04 20:49 ` Zygo Blaxell
2022-01-04 22:37 ` Eric Levy
2022-01-04 22:46 ` Qu Wenruo
2022-01-05 0:38 ` Paul Jones
2022-01-05 0:44 ` Eric Levy
2022-01-05 1:12 ` Paul Jones
2022-01-05 1:20 ` Eric Levy
2022-01-05 1:21 ` Zygo Blaxell
2022-01-05 1:26 ` Eric Levy
2022-01-05 1:33 ` Zygo Blaxell
2022-01-05 1:37 ` Eric Levy
2022-01-05 2:20 ` Zygo Blaxell
2022-01-05 1:32 ` Zygo Blaxell
2022-01-04 22:37 ` Qu Wenruo
2022-01-03 11:46 ` David Disseldorp
2022-01-03 11:57 ` Qu Wenruo [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=409d6824-bf81-111e-286d-e004025b25c2@gmx.com \
--to=quwenruo.btrfs@gmx.com \
--cc=contact@ericlevy.name \
--cc=ddiss@suse.de \
--cc=linux-btrfs@vger.kernel.org \
/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