From: Ric Wheeler Subject: Re: Ext4: batched discard support Date: Mon, 19 Apr 2010 14:04:51 -0400 Message-ID: <4BCC9B43.8080805@redhat.com> References: <1271674527-2977-1-git-send-email-lczerner@redhat.com> <4BCC8511.2070402@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: Eric Sandeen , Lukas Czerner , linux-ext4@vger.kernel.org, Jeff Moyer , Edward Shishkin , Eric Sandeen , Mark Lord To: Greg Freemyer Return-path: Received: from mx1.redhat.com ([209.132.183.28]:34370 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752186Ab0DSSCm (ORCPT ); Mon, 19 Apr 2010 14:02:42 -0400 In-Reply-To: Sender: linux-ext4-owner@vger.kernel.org List-ID: On 04/19/2010 01:58 PM, Greg Freemyer wrote: > On Mon, Apr 19, 2010 at 12:30 PM, Eric Sandeen wrote: >> Greg Freemyer wrote: >>> Adding Mark Lord in cc. >>> >>> He wrote a preliminary discard solution last summer. I'm not sure how >>> it has progressed. >> >> The difference here is that Mark's stuff wasn't as tightly integrated >> with the kernel, IIRC. What I saw was more at a user level - make a big >> file, map it, discard all the blocks, unlink the file. >> >> It was a good first step, but I think we can do a lot better by using >> fs-specific calls to be efficient& targeted about the discards. >> >> Christoph has a similar approach for XFS, FWIW. >> >> -Eric > > I haven't looked closely at this patch, but I recall Mark consolidated > numerous discontinuous trim/discard/unmap ranges into a single command > to the SSD drive. > > That was why he felt he was getting superior performance. ie. There > was an overhead per command to the drive that was eliminated if a > single more complex command with multiple ranges went to the SSD > drive. > > But he's the one that did the work and the benchmarking, so I'll let > him take it from here, especially if I mis-understood what he was > doing. > > Greg This work certainly builds on Mark's early results which clearly showed that several devices see a win from doing larger/batched discards instead of the fine grained ones. Thanks! Ric