Eric Sandeen wrote:
Dave Chinner wrote:
I did some initial work on tracking extents being freed, but then
the TRIM request morphed into a "tell the largest free space around
the area just freed" and that is much harder to do than simply to
issue a "we just freed this bit" command.
FWIW, ext is still doing it block by block. At least for SSDs, I
think that's fine, isn't it?
Well, theoretically, if there was a SSD that on one hand was sophisticated
enough to provide TRIM support, but would otherwise not use an intelligent
controller or cache memory and thus could pre-erase blocks only if the
TRIM was applied to a whole erase block at once, then even a SSD could
benefit from "telling the largest free space around the area just freed".
In practice, I don't think there will ever be a SSD like that on the market,
the primitive ones do not support TRIM, the sophisticated ones will
keep book of unused sectors internally and will notice when a whole erase-block
became empty and thus ready for proactive erasing.
And I did not find any requirement or hint to "tell the largest free space
the area just freed" in