From: Theodore Ts'o <tytso@mit.edu>
To: Christoph Hellwig <hch@infradead.org>
Cc: linux-fsdevel@vger.kernel.org,
Ext4 Developers List <linux-ext4@vger.kernel.org>
Subject: Re: [PATCH RFC] fs: add FIEMAP_FLAG_DISCARD support
Date: Mon, 4 Nov 2013 19:51:46 -0500 [thread overview]
Message-ID: <20131105005146.GA26249@thunk.org> (raw)
In-Reply-To: <20131104100343.GA10004@infradead.org>
On Mon, Nov 04, 2013 at 02:03:43AM -0800, Christoph Hellwig wrote:
>
> Besides that I really miss an explanation what the intended use cases
> are. What does this buy us over punching a hole on an actual real
> workload? Where is the overhead? Is it our shitty discard
> implementation? If so there's tons of low hanging fruit to fix there
> anyway that we shouldn't work around by interfaces taking shortcuts.
> Is it problems in ext4's extent management on hole punch? Is the
> bit of metadata created when doing an actual hole punch too much for
> that very specific workload?
The an application in question wants to treat a large file as if it
were a block device --- that's hardly unprecedented; enterprise
databases tend to prefer using raw block devices (at least for
benchmarking purposes), but system administrators like to
administrative convenience of using a file system.
The goal here is get the performace as close to a raw block device as
possible. Especially if you are using fast flash, the overhead of
deallocating blocks using punch, only to reallocate the blocks when we
later write into them, is just unnecessary overhead. Also, if you
deallocate the blocks, they could end up getting grabbed by some other
block allocation, which means the file can end up getting very
fragmented --- which doesn't matter that much for flash, I suppose,
but it means the extent tree could end up growing and getting nasty
over time. The bottom line is why bother doing extra work when it's
not necessary?
If people don't like exposing this via FIEMAP, we could just simply
make it available via the BLKDISCARD ioctl, which already exists
(although currently it is only implemented for block devices).
- Ted
next prev parent reply other threads:[~2013-11-05 0:51 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-11-02 23:45 [PATCH RFC] fs: add FIEMAP_FLAG_DISCARD support Theodore Ts'o
2013-11-03 23:14 ` Dave Chinner
2013-11-03 23:42 ` Theodore Ts'o
2013-11-04 21:57 ` Dave Chinner
2013-11-05 0:35 ` [PATCH RFC] " Andreas Dilger
2013-11-04 10:03 ` [PATCH RFC] fs: " Christoph Hellwig
2013-11-05 0:51 ` Theodore Ts'o [this message]
2013-11-05 1:17 ` Christoph Hellwig
2013-11-05 4:36 ` 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=20131105005146.GA26249@thunk.org \
--to=tytso@mit.edu \
--cc=hch@infradead.org \
--cc=linux-ext4@vger.kernel.org \
--cc=linux-fsdevel@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).