UBI/UBIFS: dealing with MLC's paired pages
Boris Brezillon
boris.brezillon at free-electrons.com
Thu Sep 17 08:46:42 PDT 2015
Hi Artem,
On Thu, 17 Sep 2015 18:20:39 +0300
Artem Bityutskiy <dedekind1 at gmail.com> wrote:
> On Thu, 2015-09-17 at 15:22 +0200, Boris Brezillon wrote:
> > Hello,
> >
> > I'm currently working on the paired pages problem we have on MLC
> > chips.
> > I remember discussing it with Artem earlier this year when I was
> > preparing my talk for ELC.
>
> Hi Boris,
>
> excellent summary, very structured. I won't generate any new idea now,
> just an implementation tactics suggestion.
I'm taking that too :-).
>
> For an implementation, I'd started with a power cut emulator which
> emulates paired pages. I'd probably do it in UBI, may be lower.
I actually these kind of emulation in nandsim, though I currently
generate a kernel Oops when the emulated power-cut occurs, which is not
really easy to use (still both paired pages are corrupted on the file
used by nandsim to store NAND data).
I'm considering changing the behavior to return -EROFS instead of
BUG(), but I'm still not sure upper layers are expecting this error...
I know that using an emulation layer is the only way to go if we want
to test the implementation, but I managed to generate those paired
pages problem manually by launching a reset in the middle of a page
program operation. Even this 'page program interruption' code is still
hacky, I think we'll be able to 'easily' validate the solution in real
world use cases when it's ready.
> I'd
> also write a good UBI power-cut test application.
Not sure what you mean by a UBI power-cut application?
> And then I'd start
> playing with various implementation approaches.
Yep, that was the plan, I was hoping you could help me exclude some of
them, but I guess testing all of them is the only way to find the
best one :-/.
> I'd use the test-driven
> approach.
Hm, yep I guess that's the only way to test as much cases as possible,
but even with that I doubt I'll be able to think of all the cases that
could happen in real world.
Thanks for the feedback.
Best Regards,
Boris
--
Boris Brezillon, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com
More information about the linux-mtd
mailing list