From: Andreas Dilger <adilger@dilger.ca>
To: Avi Kivity <avi@scylladb.com>
Cc: Andres Freund <andres@anarazel.de>,
"Darrick J. Wong" <darrick.wong@oracle.com>,
Christoph Hellwig <hch@infradead.org>,
linux-fsdevel@vger.kernel.org, linux-xfs@vger.kernel.org,
linux-ext4@vger.kernel.org, linux-block@vger.kernel.org
Subject: Re: fallocate(FALLOC_FL_ZERO_RANGE_BUT_REALLY) to avoid unwritten extents?
Date: Mon, 18 Jan 2021 20:44:04 -0700 [thread overview]
Message-ID: <6D9D9B4D-65E5-4993-AC08-080B677BA78E@dilger.ca> (raw)
In-Reply-To: <6d982635-d978-e044-4cca-c140401eb0d3@scylladb.com>
[-- Attachment #1: Type: text/plain, Size: 1281 bytes --]
On Jan 13, 2021, at 12:44 AM, Avi Kivity <avi@scylladb.com> wrote:
>
> On 1/12/21 11:36 PM, Andres Freund wrote:
>> Hi,
>>
>> On 2021-01-12 13:14:45 -0800, Darrick J. Wong wrote:
>>> ALLOCSP64 can only allocate pre-zeroed blocks as part of extending EOF,
>>> whereas a new FZERO flag means that we can pre-zero an arbitrary range
>>> of bytes in a file. I don't know if Avi or Andres' usecases demand that
>>> kind of flexibilty but I know I'd rather go for the more powerful
>>> interface.
>> Postgres/I don't at the moment have a need to allocate "written" zeroed
>> space anywhere but EOF. I can see some potential uses for more flexible
>> pre-zeroing in the future though, but not very near term.
>>
>
> I also agree that it's better not to have the kernel fall back internally on writing zeros, letting userspace do that. The assumption is that WRITE SAME will be O(1)-ish and so can bypass scheduling decisions, but if we need to write zeros, better let the application throttle the rate.
Writing zeroes from userspace has a *lot* more overhead when there is a network
filesystem involved. It would be better to generate the zeroes on the server,
or directly in the disk than sending GB of zeroes over the network.
Cheers, Andreas
[-- Attachment #2: Message signed with OpenPGP --]
[-- Type: application/pgp-signature, Size: 873 bytes --]
next prev parent reply other threads:[~2021-01-19 3:45 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-12-30 6:28 fallocate(FALLOC_FL_ZERO_RANGE_BUT_REALLY) to avoid unwritten extents? Andres Freund
2021-01-04 18:19 ` Darrick J. Wong
2021-01-04 19:10 ` Andres Freund
2021-01-04 19:57 ` Avi Kivity
2021-01-12 18:16 ` Christoph Hellwig
2021-01-12 18:39 ` Andreas Dilger
2021-01-12 18:43 ` Christoph Hellwig
2021-01-12 18:51 ` Andreas Dilger
2021-01-12 21:14 ` Darrick J. Wong
2021-01-12 21:36 ` Andres Freund
2021-01-13 7:44 ` Avi Kivity
2021-01-19 3:44 ` Andreas Dilger [this message]
2021-01-04 19:17 ` Theodore Ts'o
2021-01-04 19:24 ` Matthew Wilcox
2021-01-04 20:29 ` Andres Freund
2021-01-04 22:40 ` Eric Sandeen
2021-01-06 22:52 ` Dave Chinner
2021-01-06 23:40 ` Andres Freund
2021-01-08 20:32 ` Dave Chinner
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=6D9D9B4D-65E5-4993-AC08-080B677BA78E@dilger.ca \
--to=adilger@dilger.ca \
--cc=andres@anarazel.de \
--cc=avi@scylladb.com \
--cc=darrick.wong@oracle.com \
--cc=hch@infradead.org \
--cc=linux-block@vger.kernel.org \
--cc=linux-ext4@vger.kernel.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-xfs@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;
as well as URLs for NNTP newsgroup(s).