From owner-freebsd-arm@freebsd.org Fri Aug 24 00:06:22 2018 Return-Path: Delivered-To: freebsd-arm@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 48A2A109BB85; Fri, 24 Aug 2018 00:06:22 +0000 (UTC) (envelope-from fbsd@www.zefox.net) Received: from www.zefox.net (www.zefox.net [50.1.20.27]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "www.zefox.org", Issuer "www.zefox.org" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 966D18DE71; Fri, 24 Aug 2018 00:06:21 +0000 (UTC) (envelope-from fbsd@www.zefox.net) Received: from www.zefox.net (localhost [127.0.0.1]) by www.zefox.net (8.15.2/8.15.2) with ESMTPS id w7O06bLd002974 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Thu, 23 Aug 2018 17:06:38 -0700 (PDT) (envelope-from fbsd@www.zefox.net) Received: (from fbsd@localhost) by www.zefox.net (8.15.2/8.15.2/Submit) id w7O06b7P002973; Thu, 23 Aug 2018 17:06:37 -0700 (PDT) (envelope-from fbsd) Date: Thu, 23 Aug 2018 17:06:37 -0700 From: bob prohaska To: Kirk McKusick Cc: FreeBSD Filesystems , freebsd-arm@freebsd.org, bob prohaska Subject: Re: CFT: TRIM Consolodation on UFS/FFS filesystems Message-ID: <20180824000637.GA2157@www.zefox.net> References: <20180822004843.GA84687@www.zefox.net> <201808230557.w7N5vvjj038580@chez.mckusick.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201808230557.w7N5vvjj038580@chez.mckusick.com> User-Agent: Mutt/1.5.24 (2015-08-30) X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: "Porting FreeBSD to ARM processors." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 24 Aug 2018 00:06:22 -0000 On Wed, Aug 22, 2018 at 10:57:57PM -0700, Kirk McKusick wrote: > > Date: Tue, 21 Aug 2018 17:48:43 -0700 > > From: bob prohaska > > To: Kirk McKusick > > Cc: FreeBSD Current , > > FreeBSD Filesystems , > > bob prohaska > > Subject: Re: CFT: TRIM Consolodation on UFS/FFS filesystems > > X-ASK-Info: Message Queued (2018/08/21 17:55:39) > > X-ASK-Info: Confirmed by User (2018/08/21 18:47:17) > > > > > > Will the new feature be active on a Raspberry Pi 3 using flash > > on microSD and USB for file systems and swap? > > When you create the filesystem (using newfs) you need to specify > the -t option to request that it send TRIM commands to the underlying > media. If you have an existing filesystem, you can use the command > `tunefs -t enable ' to set the TRIM-request > flag. When you mount a fiesystem that has been told to send TRIM > commands, it will send an ioctl to the device asking if it supports > TRIM. If it replies that it does, then the TRIM commands will be > sent. If it does not then the kernel will print an error message > ``WARNING: : TRIM flag on fs but disk does not > support TRIM'' or ``WARNING: : TRIM flag on fs but > disk does not confirm that it supports TRIM''. If you get no message > when you mount, then the drive will accept TRIM commands. Now whether > it will do anything with them is not clear based on your quote below. > Using FreeBSD 12.0-ALPHA2 #12 r338122: Tue Aug 21 14:26:18 PDT 2018 Alas, no luck. On mount TRIM isn't supported: WARNING: /usr: TRIM flag on fs but disk does not support TRIM Using tunefs on the microSD produced a different refusal: # tunefs -t enable /dev/mmcsd0s2a tunefs: issue TRIM to the disk set tunefs: /dev/mmcsd0s2a: failed to open disk for writing I tried with the device both ro and rw, same error. I expected "not supported", rather than "failed to open". If there's a mistake please tell me. Not sure if this is true of all possible storage devices, but the Sandisk Ultra microSD and Sandisk Extreme USB appear to be non-starters. Thanks very much for your help! bob prohaska