From owner-freebsd-fs@FreeBSD.ORG Fri Dec 10 00:03:33 2010 Return-Path: Delivered-To: freebsd-fs@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C6857106566C; Fri, 10 Dec 2010 00:03:33 +0000 (UTC) (envelope-from julian@freebsd.org) Received: from out-0.mx.aerioconnect.net (out-0-1.mx.aerioconnect.net [216.240.47.61]) by mx1.freebsd.org (Postfix) with ESMTP id 6D19C8FC15; Fri, 10 Dec 2010 00:03:33 +0000 (UTC) Received: from idiom.com (postfix@mx0.idiom.com [216.240.32.160]) by out-0.mx.aerioconnect.net (8.13.8/8.13.8) with ESMTP id oBA03WYs023343; Thu, 9 Dec 2010 16:03:32 -0800 X-Client-Authorized: MaGic Cook1e X-Client-Authorized: MaGic Cook1e X-Client-Authorized: MaGic Cook1e X-Client-Authorized: MaGic Cook1e X-Client-Authorized: MaGic Cook1e Received: from julian-mac.elischer.org (h-67-100-89-137.snfccasy.static.covad.net [67.100.89.137]) by idiom.com (Postfix) with ESMTP id C6CC52D601A; Thu, 9 Dec 2010 16:03:30 -0800 (PST) Message-ID: <4D016E50.101@freebsd.org> Date: Thu, 09 Dec 2010 16:03:28 -0800 From: Julian Elischer User-Agent: Mozilla/5.0 (Macintosh; U; PPC Mac OS X 10.4; en-US; rv:1.9.2.12) Gecko/20101027 Thunderbird/3.1.6 MIME-Version: 1.0 To: Kirk McKusick References: <201012091813.oB9IDd2H078366@chez.mckusick.com> In-Reply-To: <201012091813.oB9IDd2H078366@chez.mckusick.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Scanned-By: MIMEDefang 2.67 on 216.240.47.51 Cc: freebsd-fs@freebsd.org, pjd@freebsd.org, Oliver Fromme Subject: Re: TRIM support for UFS? X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 10 Dec 2010 00:03:33 -0000 On 12/9/10 10:13 AM, Kirk McKusick wrote: > Other than the nit pointed out by Pawel, the diffs look good to me. > You should consider adding the -t option to newfs so that the TRIM > option can be specified at the time the filesystem is created (as > a general rule, anything you can do with tunefs should also be > possible with newfs). > > I agree with your decision to let administrators opt-out of doing > TRIM. If experience shows it to be generally useful to have it on, > we can change the default to enabled later. If we do change the > default to enabled, then we will want to delete the warning about TRIM > not being supported by the underlying disk that you added at mount > time as we would start getting a lot of them for all the non-SSD disks. > > Kirk McKusick > I echo the above. I am very happy to see this happen, and if it goes into 8.x I'll try see that we (fusion-io) support it in our FreeBSD driver as soon as we can. Several people have asked why trim is important for flash based devices.. The answer is that 'trimmed' packets get added back to the 'free pool of pages available for a flash device to use and that helps in two ways. firstly the average free space recoverable when you wring out a used block of sectors increases, meaning that you have to garbage collect fewer of them, which means that you have less overhead eating into your performance, and secondly, when you start off after a period of low utilisation, you have more headroom to write into before you need to start garbage collection. it's a win-win..