geli+trim support

Poul-Henning Kamp phk at phk.freebsd.dk
Sat Jul 5 08:36:18 UTC 2014


In message <53B750C1.8070706 at gooch.io>, Jesse Gooch writes:

>> If you TRIM, your old sector is still unchanged somewhere in flash, but
>> if you're lucky for slightly less time.
>
>Perhaps I misunderstand TRIM, isn't the point of TRIM that it zeroes out
>the sector ahead of time so it doesn't have to re-do it again when it
>stores more data in that sector later?

Yes.

But "ahead of time" does not mean "now."

It's a fairly lenghty explanation, but the short version is that TRIM'ing
a sector means that the FTL knows you don't care about the contents of
the sector, so it need not be preserved during "washes".

When the washes actually happen depends on how large the actual free-pool
is and very strongly on if an eraseblock happens to be all TRIM'ed and
finally on the wear-levelling algorithm and the characteristics of the
flash that informs it.

There is no way to characterize any of these things, without full
acces to the FLT.

-- 
Poul-Henning Kamp       | UNIX since Zilog Zeus 3.20
phk at FreeBSD.ORG         | TCP/IP since RFC 956
FreeBSD committer       | BSD since 4.3-tahoe    
Never attribute to malice what can adequately be explained by incompetence.


More information about the freebsd-hackers mailing list