[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
On Sat, 3 Mar 2001, Vipin Malik wrote:
> >And how do we determine how many times we have to test? If we test it
> >twice is that good enough? Is 56 times enough? IMHO, it would be more
> >straightforward to just go ahead and erase the sectors,
> You are correct of course. This is a trade off. The more times
> you read, statistically the higher chance that you will catch
> a flipped bit. Of course, even reading many times is a decreasing
> value function, as at one cross over point, the time to read n times
> multiplied by the probability of missing a "bad" sector will be
> greater than the sector erase time.
That's not a simple calculation. In the 'erase it anyway' case you have to
bear in mind that you've just used up 1/100,000 of the chip's lifetime.
Consider a device with 128KiB erase block size. If you read a block and it
appears to have any random zero bits, you're going to erase it, so you're
OK. It's only if you get all the way to the end and by chance you've read
1,048,576 ones that you've even missed the first hurdle.
I don't think this is going to be even a drop in the ocean. If we think it
could possibly be a problem, we could scan the potentially-clean sectors
twice - we can even do it in the background after mount, leaving them on a
'probably_clean_list' till we've scanned them.
What is the probability that two scans through 1Mib will return all ones
if in fact the erase block was only half-erased?
Compare that with the probability that the sky will fall on your head
anyway. Do we still care?
To unsubscribe from this list: send the line "unsubscribe jffs-dev" in
the body of a message to firstname.lastname@example.org