From owner-freebsd-arm@freebsd.org Sun Aug 26 17:42:03 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 B26C8107CC81; Sun, 26 Aug 2018 17:42:03 +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 29207897AD; Sun, 26 Aug 2018 17:42:02 +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 w7QHgEaA015390 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Sun, 26 Aug 2018 10:42:15 -0700 (PDT) (envelope-from fbsd@www.zefox.net) Received: (from fbsd@localhost) by www.zefox.net (8.15.2/8.15.2/Submit) id w7QHgE57015389; Sun, 26 Aug 2018 10:42:14 -0700 (PDT) (envelope-from fbsd) Date: Sun, 26 Aug 2018 10:42:13 -0700 From: bob prohaska To: Ian Lepore Cc: Kirk McKusick , FreeBSD Filesystems , freebsd-arm@freebsd.org, bob prohaska Subject: Re: CFT: TRIM Consolodation on UFS/FFS filesystems Message-ID: <20180826174213.GA15325@www.zefox.net> References: <20180824000637.GA2157@www.zefox.net> <201808240027.w7O0Rh7f062555@chez.mckusick.com> <20180824161443.GB2157@www.zefox.net> <1535127958.1488.31.camel@freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1535127958.1488.31.camel@freebsd.org> 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: Sun, 26 Aug 2018 17:42:03 -0000 On Fri, Aug 24, 2018 at 10:25:58AM -0600, Ian Lepore wrote: > A usb sdcard reader/writer will definitely mask the trim capability of > an sdcard. Aside from that, ALL sdcards support trim on freebsd, > regardless of what any support folks at sandisk might tell you. The > trim operation is supported in the mmcsd driver by issuing sd erase > commands (CMD32/33/38 sequence) which has been in the sd spec from the > beginning. > > That said, it's my experience that different cards implement CMD38 > different ways. Some cards treat it like a TRIM -- it's a hint that > tells the card "the data in these sectors need not be preserved during > future updates to the erase block they're embedded in", and thus they > happen very fast and improve efficiency. Other cards treat it as a more > synchronous operation, physically erasing the blocks involved while- > you-wait, which can be *horrible* for performance on ufs (although > potentially it might get better with the consolidation of BIO_DELETEs). This raises a practical question: How does throughput to microSD compare to throughput to USB, assuming the flash controllers are well-executed? Sizewise there's no need for two devices, a single microSD has plenty of space for my purposes. I thought that having a separate device for swap and maybe /usr would speed things up, but perhaps that's quaint notion leftover from st506 days. Thanks for reading! bob prohaska