On Fri, 31 Jul 2015 18:19:30 +0200
Andrea Scian <rnd4@xxxxxxxxxxxx> wrote:
Il 31/07/2015 16:10, Boris Brezillon ha scritto:Sure.
On Fri, 31 Jul 2015 15:40:13 +0200Let's wait what the others says about this, but I would like to put some
Andrea Scian <rnd4@xxxxxxxxxxxx> wrote:
Boris,Nope, but this implies doing an extra read after each write :-/
Il 31/07/2015 12:32, Boris Brezillon ha scritto:
Hi Andrea,I perfectly understand, that's the reason why I ask if you want to move
Adding Han in Cc.
On Fri, 31 Jul 2015 12:07:21 +0200
Andrea Scian <rnd4@xxxxxxxxxxxx> wrote:
Dear Boris,Yes I've read it, and decided to go for ecc->strength as a first
Il 30/07/2015 19:34, Boris Brezillon ha scritto:
The default NAND read functions are relying on an underlying controllerI'm still wondering if chip->ecc.strength is the right threshold.
to correct bitflips, but some of those controller cannot properly fix
bitflips in erased pages.
In case of ECC failures, check if the page of subpage is empty before
reporting an ECC failure.
Did you see my comments here [1]? WDYT?
step (I'm more interested in discussing the approach than the threshold
value right now ;-)).
to another thread ;-)
Anyway, as you pointed out in the thread, writing data on an erasedYes, I think that there's no real way to get the right value, other than
page already containing some bitflips might generate even more
bitflips, so using a different threshold for the erased page check
makes sense. This threshold should definitely be correlated to the ECC
strength, but how, that's the question.
How about taking a rather conservative value like 10% of the specified
ECC strength, and see how it goes.
feedbacks from on-field testing with various devices.
I'm also thinking about changing how a NAND page is written on the
device, now that we know that even erased page may have (too many!)
bitflips if they has not been so-freshly erased.
Read on NAND device is lot's faster that write, so maybe we can:
a) read the page before write it, check for bitflips on erased area and
write it only if it fit our threshold
b) read the page after write it and check if the bitflips are lower that
a give value
In this way:
- we can use ecc_strength as read threshold, because it fits all the
other NAND read
- we can use "something a bit lower than" mtd->bitflip_threshold on
read-before-write or read-after-write. If we don't do so the block will
be scrubbed next time we read it again (if we are lucky.. if we are
unlucky the block will have bitflip > ecc_strength!): IOW we did a write
that will trigger another erase/write cycle.
Am I misunderstanding something?
numbers in it.
My micron MLC device saysIndeed, that's not such a big overhead.
- read page max 75 uS
- write page typ 1300uS, max 2600uS
If we implement read-before-write (which is, IMO, the best approach), in
the worst overhead we have is 1375uS vs 1300uS, which is ~6%.
Please note that, if you read a page that "is not suitable" for write,
you avoid the write time, schedule it for scrubbing, and use another
free page.
Probably I'm a bit optimistic because we also need to take in accountYep, if you test it, could you provide some speed test results (with
other latencies (DMA setup, ECC engine, buffer copies and so on) but
it's a starting point ;-)
and without this solution).
And I wonder if we shouldn't do it the other way around, write then
read-back and check the content.
Of course this implies doing the extra write even when the erased page
contains too many bitflips, but at least your sure that the data you
put in the page were correct at that time.