From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1750963AbZHQEYp (ORCPT ); Mon, 17 Aug 2009 00:24:45 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1750842AbZHQEYo (ORCPT ); Mon, 17 Aug 2009 00:24:44 -0400 Received: from smtp.infotech.no ([82.134.31.41]:57243 "EHLO elrond.infotech.no" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750800AbZHQEYn (ORCPT ); Mon, 17 Aug 2009 00:24:43 -0400 Message-ID: <4A88DB77.2070304@interlog.com> Date: Mon, 17 Aug 2009 00:24:23 -0400 From: Douglas Gilbert Reply-To: dgilbert@interlog.com User-Agent: Thunderbird 2.0.0.22 (X11/20090608) MIME-Version: 1.0 To: Christoph Hellwig CC: James Bottomley , Arjan van de Ven , Alan Cox , Mark Lord , Chris Worley , Matthew Wilcox , Bryan Donlan , david@lang.hm, Greg Freemyer , Markus Trippelsdorf , Matthew Wilcox , Hugh Dickins , Nitin Gupta , Ingo Molnar , Peter Zijlstra , linux-kernel@vger.kernel.org, linux-mm@kvack.org, linux-scsi@vger.kernel.org, linux-ide@vger.kernel.org, Linux RAID Subject: Re: Discard support (was Re: [PATCH] swap: send callback when swap slot is freed) References: <4A85E0DC.9040101@rtr.ca> <20090814234539.GE27148@parisc-linux.org> <1250341176.4159.2.camel@mulgrave.site> <4A86B69C.7090001@rtr.ca> <1250344518.4159.4.camel@mulgrave.site> <20090816150530.2bae6d1f@lxorguk.ukuu.org.uk> <20090816083434.2ce69859@infradead.org> <1250437927.3856.119.camel@mulgrave.site> <20090816165943.GA26983@infradead.org> In-Reply-To: <20090816165943.GA26983@infradead.org> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Christoph Hellwig wrote: > On Sun, Aug 16, 2009 at 10:52:07AM -0500, James Bottomley wrote: >> However, the enterprise has been doing UNMAP for a while, so we can draw >> inferences from them since the SSD FTL will operate similarly. For >> them, UNMAP is the same cost in terms of time regardless of the number >> of extents. The reason is that it's moving the blocks from the global >> in use list to the global free list. Part of the problem is that this >> involves locking and quiescing, so UNMAP ends up being quite expensive >> to the array but constant in terms of cost (hence they want as few >> unmaps for as many sectors as possible). > > How are they doing the unmaps? Using something similar to Mark's wiper > script and using SG_IO? Because right now we do not actually implement > UNMAP support in the kernel. I'd really love to test the XFS batched > discard support with a real UNMAP implementation. The sg3_utils version 1.28 beta at http://sg.danny.cz/sg/ has a new sg_unmap utility and the previous release included sg_write_same with Unmap bit support. sg_readcap has been updated to show the TPE and TPRZ bits. There is a new SCSI GET LBA STATUS command coming (approved at the last t10 meeting, awaiting the next SBC-3 draft). That will show the mapped/unmapped status of logical blocks in a range of LBAs. I can add a utility for that as well. Doug Gilbert