Re: Compact Flash Question
From: Lennart Sorensen
Date: Wed May 07 2008 - 10:53:47 EST
On Wed, May 07, 2008 at 09:12:51AM +0200, Tomasz Chmielewski wrote:
> Compact Flash (and other similar media) does wear levelling, so
> essentially, even if we write to the same fixed location, in reality, it
> will mostly go to a different area on flash each time.
>
> As Compact Flash and its wear levelling does not know about free space on
> the filesystem, the wear levelling's effectiveness can be only limited -
> writes won't spread on the whole free area of the flash.
>
> Does anyone know how wear levelling is done in these devices? Perhaps it
> will differ from a manufacturer to manufacturer, but I guess they have a
> free area we normally use to store data, and some reserved area used just
> for wear levelling and bad block handling, but that's just my guess.
Certainly some cards will take blocks that haven't been changed very
much and exchange them for blocks that have been written more often
(this being physical blocks, not the virtual mapping shown to the
outside). That way the wear gets spread around more even if some parts
of the flash are never changed (from the point of view of the outside).
The actual algorithm used is vendor specific.
--
Len Sorensen
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/