TRIM clustering

Bob Friesenhahn bfriesen at
Sun May 1 15:17:44 UTC 2011

On Sat, 30 Apr 2011, Alexander Motin wrote:
>> well not all devices take it as a hit.. The suggestion of some sort of
>> clustering is a good one but it should be tunable.
> I believe any device should benefit from receiving single 128K request
> instead of 8*16k. Just because of command processing overhead. Am I wrong?

Since I have not seen it mentioned in this discussion thread yet, it 
is worth pointing out that if TRIM has already been issued for a block 
that the filesystem can not re-use that space for storage until the 
TRIM request is completed.  Otherwise in-use blocks might get TRIMmed, 
resulting in filesystem destruction.

If the system should spontaneously reboot, then there may be a 
mismatch between the filesystem's notion of free blocks and the FLASH 
device's notion of free blocks.  In fact, if the kernel panics, the 
device may continue trimming blocks after the system is gone (because 
power is still on).

Bob Friesenhahn
bfriesen at,
GraphicsMagick Maintainer,

More information about the freebsd-fs mailing list