2009/9/7 Richard Elling <richard.ell...@gmail.com>:
> On Sep 7, 2009, at 10:20 AM, Bob Friesenhahn wrote:
>
>> The purpose of the TRIM command is to allow the FLASH device to reclaim
>> and erase storage at its leisure so that the writer does not need to wait
>> for erasure once the device becomes full.  Otherwise the FLASH device does
>> not know when an area stops being used.
>
> Yep, it is there to try and solve the problem of rewrites in a small area,
> smaller than the bulk erase size.  While it would be trivial to traverse the
> spacemap and TRIM the free blocks, it might not improve performance
> for COW file systems. My crystal ball says smarter flash controllers or a
> form of managed flash will win and obviate the need for TRIM entirely.
>  -- richard

I agree with this sentiment, although I still look forward to it being obviated
by a better memory technology instead, like PRAM.  In any case, the ATA
TRIM command may not be so useful after all, as it can't be queued:

    http://lwn.net/Articles/347511/

As an aside, after a bit of digging, I came across fcntl(F_FREESP).
This will at least allow you to put the sparse back into sparse files if you
so desire.  Unfortunately, I don't see any way to do this for a zvol.

Chris
_______________________________________________
zfs-discuss mailing list
zfs-discuss@opensolaris.org
http://mail.opensolaris.org/mailman/listinfo/zfs-discuss

Reply via email to