Re: [PATCH 2/2] Add batched discard support for ext4.

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Martin K. Petersen
Date: Saturday, April 24, 2010 - 12:06 pm

>>>>> "Greg" == Greg Freemyer <greg.freemyer@gmail.com> writes:

Greg> Is it also agreed by all that the current ext4 kernel
Greg> implementation of calling discard is a poor solution for most
Greg> hardware / block layers stacks / workloads and therefore is not
Greg> worth retaining nor performing further benchmarks?

Our discard implementation is meant to accommodate a wide range of
devices.  Just because some of the currently shipping low-end consumer
SSDs implement TRIM poorly does not mean we're going to scrap what we
have.

We are not in the business of designing for the past.  Especially not
when the past can be handled by a shell script.

For future devices TRIM/UNMAP is going to be an inherent part of the
command set.  And that's what our kernel support is aimed at.  There are
some deficiencies right now because the block layer was not built to
handle what is essentially a hybrid between a filesystem and a blk_pc
type request.  I'm working on fixing that.


Greg> I've not seen anyone arguing to keep the current kernel
Greg> implementation and I for one accept the previously posted
Greg> benchmarks that show it is not adding any value relative to the
Greg> traditional non-discard case.

For enterprise storage the cost of sending discards is limited to the
overhead of sending the command.  I.e. negligible.

Eventually that's going to be the case for ATA devices as well.  And let
me just reiterate that Windows 7 does issue TRIM like we do (at
runtime).  And consequently Windows 7 will help weed out the crap SSD
implementations from the market.  That's already happening.

There is also work underway to make TRIM a queueable command which would
further alleviate the situation.


Greg> Therefore benchmarks between the current hdparm/wiper.sh userspace
Greg> implementation and a proposed new kernel implementation would be
Greg> the most beneficial?

I don't know what you mean by "new" kernel implementation.  We're
working on tweaking what we have so that we can split, merge, and
coalesce requests.

I'm also not sure why you're so hung up on benchmarks.  The purpose of
TRIM is to increase longevity of a flash-based device.  For dumb devices
there's currently a tradeoff - do you want speed or endurance?  Once
devices get smarter that tradeoff will disappear.

-- 
Martin K. Petersen	Oracle Linux Engineering
--
To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Ext4: batched discard support, Lukas Czerner, (Mon Apr 19, 3:55 am)
[PATCH 1/2] Add ioctl FITRIM., Lukas Czerner, (Mon Apr 19, 3:55 am)
[PATCH 2/2] Add batched discard support for ext4., Lukas Czerner, (Mon Apr 19, 3:55 am)
Re: Ext4: batched discard support, Greg Freemyer, (Mon Apr 19, 9:20 am)
Re: Ext4: batched discard support, Eric Sandeen, (Mon Apr 19, 9:30 am)
Re: Ext4: batched discard support, Greg Freemyer, (Mon Apr 19, 10:58 am)
Re: Ext4: batched discard support, Ric Wheeler, (Mon Apr 19, 11:04 am)
Re: Ext4: batched discard support, Mark Lord, (Tue Apr 20, 1:24 pm)
Re: Ext4: batched discard support, Mark Lord, (Tue Apr 20, 1:34 pm)
Re: [PATCH 2/2] Add batched discard support for ext4., Greg Freemyer, (Tue Apr 20, 2:21 pm)
Re: [PATCH 2/2] Add batched discard support for ext4., Eric Sandeen, (Tue Apr 20, 7:45 pm)
Re: [PATCH 2/2] Add batched discard support for ext4., Greg Freemyer, (Wed Apr 21, 11:59 am)
Re: [PATCH 2/2] Add batched discard support for ext4., Ric Wheeler, (Wed Apr 21, 12:04 pm)
Re: [PATCH 2/2] Add batched discard support for ext4., Jeff Moyer, (Wed Apr 21, 12:22 pm)
Re: [PATCH 2/2] Add batched discard support for ext4., Greg Freemyer, (Wed Apr 21, 1:44 pm)
Re: [PATCH 2/2] Add batched discard support for ext4., Greg Freemyer, (Wed Apr 21, 1:52 pm)
Re: [PATCH 2/2] Add batched discard support for ext4., Greg Freemyer, (Wed Apr 21, 1:53 pm)
Re: [PATCH 2/2] Add batched discard support for ext4., Eric Sandeen, (Wed Apr 21, 2:01 pm)
Re: [PATCH 2/2] Add batched discard support for ext4., Ric Wheeler, (Wed Apr 21, 2:03 pm)
Re: [PATCH 2/2] Add batched discard support for ext4., Greg Freemyer, (Wed Apr 21, 2:47 pm)
Re: [PATCH 2/2] Add batched discard support for ext4., James Bottomley, (Wed Apr 21, 2:56 pm)
Re: [PATCH 2/2] Add batched discard support for ext4., Lukas Czerner, (Fri Apr 23, 1:23 am)
Re: [PATCH 2/2] Add batched discard support for ext4., Greg Freemyer, (Sat Apr 24, 6:24 am)
Re: [PATCH 2/2] Add batched discard support for ext4., Ric Wheeler, (Sat Apr 24, 6:48 am)
Re: [PATCH 2/2] Add batched discard support for ext4., Greg Freemyer, (Sat Apr 24, 7:30 am)
Re: [PATCH 2/2] Add batched discard support for ext4., Eric Sandeen, (Sat Apr 24, 7:43 am)
Re: [PATCH 2/2] Add batched discard support for ext4., Greg Freemyer, (Sat Apr 24, 8:03 am)
Re: [PATCH 2/2] Add batched discard support for ext4., Ric Wheeler, (Sat Apr 24, 10:04 am)
Re: [PATCH 2/2] Add batched discard support for ext4., Greg Freemyer, (Sat Apr 24, 11:30 am)
Re: [PATCH 2/2] Add batched discard support for ext4., Martin K. Petersen, (Sat Apr 24, 11:39 am)
Re: [PATCH 2/2] Add batched discard support for ext4., Ric Wheeler, (Sat Apr 24, 11:41 am)
Re: [PATCH 2/2] Add batched discard support for ext4., Martin K. Petersen, (Sat Apr 24, 12:06 pm)
Re: [PATCH 2/2] Add batched discard support for ext4., Martin K. Petersen, (Mon Apr 26, 7:42 am)
Re: [PATCH 2/2] Add batched discard support for ext4., Greg Freemyer, (Mon Apr 26, 8:27 am)
Re: [PATCH 2/2] Add batched discard support for ext4., Ric Wheeler, (Mon Apr 26, 8:48 am)
Re: [PATCH 2/2] Add batched discard support for ext4., Lukas Czerner, (Mon Apr 26, 8:51 am)
Re: [PATCH 2/2] Add batched discard support for ext4., Lukas Czerner, (Mon Apr 26, 10:46 am)
Re: [PATCH 2/2] Add batched discard support for ext4., Ric Wheeler, (Mon Apr 26, 10:52 am)
Re: [PATCH 2/2] Add batched discard support for ext4., Lukas Czerner, (Mon Apr 26, 11:14 am)
Re: [PATCH 2/2] Add batched discard support for ext4., Jeff Moyer, (Mon Apr 26, 11:28 am)