Date: Fri, 24 Aug 2018 10:25:58 -0600 From: Ian Lepore <ian@freebsd.org> To: bob prohaska <fbsd@www.zefox.net>, Kirk McKusick <mckusick@mckusick.com> Cc: FreeBSD Filesystems <freebsd-fs@FreeBSD.org>, freebsd-arm@freebsd.org Subject: Re: CFT: TRIM Consolodation on UFS/FFS filesystems Message-ID: <1535127958.1488.31.camel@freebsd.org> In-Reply-To: <20180824161443.GB2157@www.zefox.net> References: <20180824000637.GA2157@www.zefox.net> <201808240027.w7O0Rh7f062555@chez.mckusick.com> <20180824161443.GB2157@www.zefox.net>
next in thread | previous in thread | raw e-mail | index | archive | help
On Fri, 2018-08-24 at 09:14 -0700, bob prohaska wrote: > On Thu, Aug 23, 2018 at 05:27:43PM -0700, Kirk McKusick wrote: > > > > > > Assuming that /dev/mmcsd0s2a is your /usr then when the filesystem > Sorry, the mistake was mine. /dev/mmcsd0s2a was / in that attempt, > which obviously can't work. > > Moving a bootable August 2nd snapshot microSD card to a USB adapter > allowed > root@www:/ # tunefs -t enable /dev/da2s2a > tunefs: issue TRIM to the disk set > > When I remount the device with > mount -o rw /dev/da2s2a /mnt > the console reports > WARNING: /mnt: TRIM flag on fs but disk does not support TRIM > I hope that's a consequence of the intervening USB interface. > > I'll swap boot devices when the present buildworld completes and > see if the tunefs command really worked. If it did, then it'll > make sense to update and rebuild to a TRIM-enabled revision. > > That'll take a couple of days, even if I don't make any mistakes.. > > Sandisk has yet to clarify whether TRIM is supported on microSD. > > Thanks for reading, 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). -- Ian
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1535127958.1488.31.camel>