All of lore.kernel.org
 help / color / mirror / Atom feed
From: Steven Whitehouse <swhiteho@redhat.com>
To: Lukas Czerner <lczerner@redhat.com>
Cc: James Bottomley <James.Bottomley@suse.de>,
	Christoph Hellwig <hch@infradead.org>,
	Matthew Wilcox <matthew@wil.cx>, Josef Bacik <josef@redhat.com>,
	tytso@mit.edu, linux-ext4@vger.kernel.org,
	linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org,
	sandeen@redhat.com
Subject: Re: [PATCH 1/2] fs: Do not dispatch FITRIM through separate super_operation
Date: Fri, 19 Nov 2010 12:16:16 +0000	[thread overview]
Message-ID: <1290168976.2570.45.camel@dolmen> (raw)
In-Reply-To: <alpine.LFD.2.00.1011181826550.15886@dhcp-lab-213.englab.brq.redhat.com>

Hi,

On Thu, 2010-11-18 at 18:35 +0100, Lukas Czerner wrote:
> On Thu, 18 Nov 2010, James Bottomley wrote:
> 
> > On Thu, 2010-11-18 at 09:29 -0500, Christoph Hellwig wrote:
> > > On Thu, Nov 18, 2010 at 07:19:58AM -0700, Matthew Wilcox wrote:
> > > > I guess I was assuming that, on receiving a FALLOC_FL_PUNCH_HOLE, a
> > > > filesystem that was TRIM-aware would pass that information down to the
> > > > block device that it's mounted on.  I strongly feel that we shouldn't
> > > > have two interfaces to do essentially the same thing.
> > > > 
> > > > I guess I'm saying that you're going to have to learn about TRIM :-)
> > > 
> > > Did you actually look Lukas FITRIM code (not the slight reordering here,
> > > but the original one).  It's the ext4 version of the batched discard
> > > model, that is a userspace ioctl to discard free space in the
> > > filesystem.
> > > 
> > > hole punching will free the blocks into the free space pool.  If you do
> > > online discard it will also get discarded, but a filesystem that has
> > > online discard enabled doesn't need FITRIM.
> > 
> > Not stepping into the debate: I'm happy to see punch go to the mapping
> > data and FITRIM pick it up later.
> > 
> > However, I think it's time to question whether we actually still want to
> > allow online discard at all.  Most of the benchmarks show it to be a net
> > lose to almost everything (either SSD or Thinly Provisioned arrays), so
> > it's become an "enable this to degrade performance" option with no
> > upside.
> > 
> > James
> > 
> 
> This time began a long time ago :) that is why am I originally created
> batched discard for ext4 (ext3) accessible through FITRIM ioctl. Ext4
> performance with -o discard mount option goes down on the most of the
> SSD's and every Thinly-provisioned storage I have a chance to benchmark.
> 
> But, for example SSD's are getting better and as time goes by we might
> see devices that does not suffer terrible performance loss with discard
> enabled (discard on unlink in ext4 etc...), so this "online" discard
> probably still does make sense.
> 
> -Lukas

I agree that it is early days for trim/discard hardware implementations.
I hope that if it can be shown that it is useful (and if the hardware
vendors are following this thread!) then maybe it will spur them on to
providing faster implementations in the future. There doesn't seem to be
any technical reason why faster implementations are not possible.

Equally, FITRIM is useful since the overhead can be reduced to certain
points in time when a system is less busy. With GFS2 (this may well also
apply to OCFS2) doing a userspace trim is not very easy since there is
no simple way to access the locking for the fs from userspace, so it
would imply that an admin unmounted the filesystem on all nodes and then
runs a utility on just one node. Using FITRIM though, it would be
possible to perform the trim during normal fs operation (initiating
FITRIM from multiple nodes at once would also work correctly, even if it
is not desirable from a performance point of view)

GFS2 already has code for online discard, and the changes required to
support FITRIM are relatively small. Both online discard and FITRIM
simply require iterating through the resource group bitmaps and
generating discard requests depending on the bitmap states encountered.
I'm intending to put a patch together fairly shortly to implement FITRIM
for GFS2.

So I think there is a place for both approaches,

Steve.



  reply	other threads:[~2010-11-19 12:16 UTC|newest]

Thread overview: 106+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-11-18  7:36 [PATCH 1/2] fs: Do not dispatch FITRIM through separate super_operation Lukas Czerner
2010-11-18  7:36 ` [PATCH 2/2] ext4: Add EXT4_IOC_TRIM ioctl to handle batched discard Lukas Czerner
2010-11-19 16:19   ` Ted Ts'o
2010-11-19 16:26     ` Lukas Czerner
2010-11-20  1:37       ` Ted Ts'o
2010-11-18 13:06 ` [PATCH 1/2] fs: Do not dispatch FITRIM through separate super_operation Matthew Wilcox
2010-11-18 13:48   ` Josef Bacik
2010-11-18 14:19     ` Matthew Wilcox
2010-11-18 14:29       ` Christoph Hellwig
2010-11-18 17:19         ` James Bottomley
2010-11-18 17:22           ` Jeff Moyer
2010-11-18 17:41             ` James Bottomley
2010-11-18 20:04               ` Greg Freemyer
2010-11-18 20:04                 ` Greg Freemyer
2010-11-18 21:42                 ` Mark Lord
2010-11-18 21:44                 ` Mark Lord
2010-11-18 21:50                   ` James Bottomley
2010-11-18 22:07                     ` Mark Lord
2010-11-19  1:33                       ` Ted Ts'o
2010-11-19  3:44                         ` Mark Lord
2010-11-19  3:44                         ` Mark Lord
2010-11-19  3:44                           ` Mark Lord
2010-11-19 13:58                           ` Jeff Moyer
2010-11-18 23:52                   ` Martin K. Petersen
2010-11-19  0:34                     ` Mark Lord
2010-11-19  1:16                       ` Greg Freemyer
2010-11-19  1:16                         ` Greg Freemyer
2010-11-19 11:55                         ` Christoph Hellwig
2010-11-19 14:01                           ` Mark Lord
2010-11-19 14:06                             ` Christoph Hellwig
2010-11-19 14:48                               ` Mark Lord
2010-11-19 14:54                                 ` Christoph Hellwig
2010-11-19 15:24                                   ` Mark Lord
2010-11-19 15:34                                     ` Christoph Hellwig
2010-11-19 16:20                           ` Greg Freemyer
2010-11-19 16:38                             ` Christoph Hellwig
2010-11-19 18:06                               ` Lukas Czerner
2010-11-19 18:10                                 ` Lukas Czerner
2010-11-19 18:14                                   ` Lukas Czerner
2010-11-19 19:29                                 ` Chris Mason
2010-11-19  1:49                       ` Martin K. Petersen
2010-11-19  3:42                         ` Mark Lord
2010-11-18 18:05             ` Jamie Lokier
2010-11-18 19:32               ` Markus Trippelsdorf
2010-11-18 21:45                 ` Mark Lord
2010-11-18 21:50                   ` Markus Trippelsdorf
2010-11-18 22:09                     ` Mark Lord
2010-11-18 17:35           ` Lukas Czerner
2010-11-19 12:16             ` Steven Whitehouse [this message]
2010-11-19 13:53               ` Mark Lord
2010-11-19 14:02                 ` Ted Ts'o
2010-11-19 14:10                   ` Christoph Hellwig
2010-11-19 14:10                   ` Christoph Hellwig
2010-11-19 14:10                   ` Christoph Hellwig
2010-11-19 15:37                     ` Ted Ts'o
2010-11-19 15:50                       ` Christoph Hellwig
2010-11-19 15:50                       ` Christoph Hellwig
2010-11-19 15:50                         ` Christoph Hellwig
2010-11-19 16:16                         ` Ted Ts'o
2010-11-19 14:50                   ` Mark Lord
2010-11-19 14:50                   ` Mark Lord
2010-11-19 14:50                     ` Mark Lord
2010-11-19 15:35                   ` Mark Lord
2010-11-19 15:35                   ` Mark Lord
2010-11-19 15:35                     ` Mark Lord
2010-11-19 15:44                     ` Lukas Czerner
2010-11-19 16:30                       ` Ted Ts'o
2010-11-19 22:49                         ` Mark Lord
2010-11-19 22:49                           ` Mark Lord
2010-11-19 22:49                         ` Mark Lord
2010-11-25  2:48                         ` Mark Lord
2010-11-25  2:48                         ` Mark Lord
2010-11-25  2:48                           ` Mark Lord
2010-11-25  4:23                           ` Martin K. Petersen
2010-11-25 14:44                             ` Mark Lord
2010-11-25  4:41                           ` Greg Freemyer
2010-11-25  4:41                             ` Greg Freemyer
2010-11-25 14:53                             ` Mark Lord
2010-11-25 16:24                               ` Greg Freemyer
2010-11-25 16:24                                 ` Greg Freemyer
2010-11-26 13:49                                 ` Mark Lord
2010-11-26 14:00                                   ` Lukas Czerner
2010-11-18 17:55           ` Chris Mason
2010-12-03 18:24             ` Ric Wheeler
2010-11-18 21:37           ` Mark Lord
2010-11-19 11:09             ` Christoph Hellwig
2010-11-19 13:54               ` Mark Lord
2010-11-19 14:40             ` Chris Mason
2010-11-19 14:53               ` Mark Lord
2010-11-19 14:57                 ` Christoph Hellwig
2010-11-19 15:21                   ` Mark Lord
2010-12-07  9:27                     ` Christoph Hellwig
2010-12-07 16:52                       ` Chris Mason
2011-06-02  4:52                         ` Kyungmin Park
2011-06-02  8:14                           ` Lukas Czerner
2011-06-03  2:06                           ` Dave Chinner
2011-06-03  2:06                             ` Dave Chinner
2011-06-03  4:25                             ` Kyungmin Park
2011-06-03  4:25                               ` Kyungmin Park
2010-11-19 15:30                   ` Mark Lord
2010-11-21 19:07                 ` Valdis.Kletnieks
2010-11-21 20:20                   ` James Bottomley
2010-11-18 14:31       ` Josef Bacik
2010-11-18 14:36         ` Tao Ma
2010-11-19 15:41 ` Ted Ts'o
2010-11-19 15:50   ` Christoph Hellwig

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=1290168976.2570.45.camel@dolmen \
    --to=swhiteho@redhat.com \
    --cc=James.Bottomley@suse.de \
    --cc=hch@infradead.org \
    --cc=josef@redhat.com \
    --cc=lczerner@redhat.com \
    --cc=linux-ext4@vger.kernel.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=matthew@wil.cx \
    --cc=sandeen@redhat.com \
    --cc=tytso@mit.edu \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.