LWN.net Logo

TRIM?

TRIM?

Posted Dec 12, 2012 13:18 UTC (Wed) by sperl (subscriber, #5657)
In reply to: TRIM? by neilbrown
Parent article: JFFS2, UBIFS, and the growth of flash storage

As far as I remember SD-Card Specs, it is not necessarily defined, that SD cards always have to return 0xff for erased (=trimmed) blocks...

At least it mention that the behavior may depend on the type of technology (NAND/NOR/...) that is used on the HW-level.

So the behavior of expected return may also be open to implementation for SSDs... (I have not read the spec there though)


(Log in to post comments)

TRIM?

Posted Dec 12, 2012 21:05 UTC (Wed) by arnd (subscriber, #8866) [Link]

I think the cards can either return all-zero or all-one but have to report in the configuration registers which of the two they do. Of course, you could
in theory reverse all bits in software to get the behavior you want, but that has a nonzero performance impact.

Note that sending the erase command to the SD card can also help performance as it might avoid expensive garbage collection, aside from being faster than writes.

Copyright © 2013, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds