xfs
[Top] [All Lists]

Re: xfs: add FITRIM support

To: Michael Monnerie <michael.monnerie@xxxxxxxxxxxxxxxxxxx>
Subject: Re: xfs: add FITRIM support
From: Christoph Hellwig <hch@xxxxxxxxxxxxx>
Date: Thu, 6 Jan 2011 13:06:03 -0500
Cc: xfs@xxxxxxxxxxx, Lukas Czerner <lczerner@xxxxxxxxxx>, Dave Chinner <david@xxxxxxxxxxxxx>, Christoph Hellwig <hch@xxxxxxxxxxxxx>
In-reply-to: <201101052307.38379@xxxxxx>
References: <20101125112304.GA4195@xxxxxxxxxxxxx> <20110103232514.GF15179@dastard> <alpine.LFD.2.00.1101051105120.3095@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx> <201101052307.38379@xxxxxx>
User-agent: Mutt/1.5.21 (2010-09-15)
On Wed, Jan 05, 2011 at 11:07:35PM +0100, Michael Monnerie wrote:
> On Mittwoch, 5. Januar 2011 Lukas Czerner wrote:
> > If we
> > notice that we are running out of space in advance (how much in
> > advance?), we can start trimming smaller chunks, until we reach
> > reasonable a reasonable pool of reclaimed space, or until we trim
> > the whole device.
> 
> Would it be possible that all blocks that have been in use since the 
> last FITRIM run can be logged?

It's a lot of overhead for the big hammer approach the FITRIM is.  If
you're interested look for some of my earlier discard support patches
as they implemented it using an rbtree.  But getting this fully right
just was a lot of overhead.  My strategy is to instead have the simple
big hammer FITRIM for e.g. people that want to reclaim storage from a
VM or thing provisioned array once in a while, while implementing an
optimized discard on commit for SSDs.  I'm planning to have the latter
ready for 2.6.39.  The biggest part to get it is to avoid allocating
extents from busy ranges, and I've finally got an older patch from Dave
to fully work for that.  The next step is to have proper asynchronous
discard requests to avoid the waiting overhead the other filesystems
have right now.

<Prev in Thread] Current Thread [Next in Thread>