ubi on MLC nand flash
Artem Bityutskiy
dedekind1 at gmail.com
Tue Nov 8 16:32:03 EST 2011
On Sun, 2011-11-06 at 07:24 -0800, Mike Dunn wrote:
> Hi everyone,
>
> I recently started to do serious testing of UBI on the diskonchip G4 MLC nand
> driver I'm finishing up.
Sounds promising - we've got another serious mtd community memeber! :-)
> I started with the io_basic ubi test in mtd-utils.
Makes sense to exclude UBIFS and test UBI directly first indeed.
> What I find is that, after a few minutes, enough PEBs are marked as bad to
> exhaust the reserve PEB pool
I guess you can make it larger, the default 1% is just something which
was good enough for our super-robust OneNAND flash.
Also, for MLC you probably want a smaller WL threshold, I heard that
modern MLCs have ereaseblock liftimes smaller than 10000 erase-cycles.
So the default 4096 might be too big.
> , UBI switches to r/o mode, and the test fails. The
> reason is that - on this device at least - bit flips seem to be persistent;
> i.e., you will get e.g. 1 bit flip every time you read a certain page.
> Consequently, when the bit flip occurs and the PEB gets scrubbed, the torture
> test fails because the bit flip reoccurs, and the PEB is marked bad.
A quick hack you can do to go further in your investigations without
being block by this issue is to hack your driver and make it to just not
return -EUCLEAN in case of 1 bit flip or may be even 2. Then you can see
ahead what else happens to UBI.
WRT the real solution - I agree with Ivan - see his e-mail, and I'll
send some comments on that.
> I expected that eventually I might have to dig into the "program disturb",
> "read-disturb" or "paired pages" MLC issues, but the problem seems more
> fundamental. My general impression is that UBI is too unforgiving for this
> device. The ecc can correct up to 4 bit flips, so 1 bit flip seems to not be a
> big deal. I'm new to UBI so this is not a critique or a proposal, I'm just
> hoping some experts can offer some advice or opinions. The obvious remedy is to
> set a higher threshold for marking a PEB as bad, say 2 or 3 bit flips.
You are right - UBI is too unforgiving. But this should be fixable, it
just needs a brave knight to do the job :-)
Artem.
More information about the linux-mtd
mailing list