Re: NAND flash misery
- From: "Vladimir Vassilevsky" <antispam_bogus@xxxxxxxxxxx>
- Date: Sat, 28 Jun 2008 08:09:06 -0500
"David Brown" <david@xxxxxxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:486611d3$0$14988$8404b019@xxxxxxxxxxxxxxxxxx
Vladimir Vassilevsky wrote:
Guess how many bad blocks are typical for NAND flash of several GB
capacity? As many as 2 percent! There could be the whole areas of
hundreds of megabytes of the contiguous bad cells, as well as the random
scatter.
It is possible to do the extensive read/write test to find the most of
the unreliable blocks; but it takes many hours.
I didn't encounter this problem until we started to use the high
capacity CF cards. The bad blocks were very rare for the cards of 1GB
and below. Since the flash iself is hidden behind the IDE interface and
a compatible file system, and the read/write performance is critical, it
is generally impossible to apply an error correction scheme.
I was under impression that flash is more reliable then HDD; now I see
that it is not so. Do you know how reliable are the IDE flash drives?
NAND flash always has defects in manufacturing - the devices are
designed to cope with a certain level of faults to make manufacturing
cheaper (the same applies to many other types of chips, and hard disks).
Each sector in NAND has extra space for error correction and detection
(IIRC, 512 byte sectors are actually 528 bytes in size). Bad blocks can
be detected and marked during manufacture and testing, and blocks that
go bad (due to wearing out) are detected in use and the data moved to
different blocks.
The utterly bad blocks are detected at manufacturing; however there is a
bunch of the unreliable blocks which takes hours of testing to discover. If
the bad block is detected when in use, it means that the data is lost
already. It is too late to hide it by remaping.
CF cards and other earlier flash devices are not that great at wear
levelling and bad block handling (that's one of the reasons for
flash-specific file systems like YAFS and JFFS2).
The actual erase block size in NAND flash is something like 32/64/128/256KB,
being bigger for the higher capacity devices. What it implies: any write
operation through the IDE interface is actually read - copy - erase -
modify - write at the controller level. The other surcumstance of that is
the speed penalty for the writes misaligned to the erase block size. Since
this kitchen is hidden behind IDE, there is no point in using YAFS or JFS or
such. A disk cache with the blocks of 32k makes a lot of sense though.
Vladimir Vassilevsky
DSP and Mixed Signal Consultant
www.abvolt.com
.
- Follow-Ups:
- Re: NAND flash misery
- From: Stefan Reuther
- Re: NAND flash misery
- From: David Brown
- Re: NAND flash misery
- References:
- NAND flash misery
- From: Vladimir Vassilevsky
- Re: NAND flash misery
- From: David Brown
- NAND flash misery
- Prev by Date: Architecture Overview
- Next by Date: Re: LPC2138 I2C
- Previous by thread: Re: NAND flash misery
- Next by thread: Re: NAND flash misery
- Index(es):