* Where is the "scrubbing" threshold set in UBI? Can it be easily varied?
@ 2014-07-03 14:07 Atlant Schmidt
2014-07-04 4:40 ` Gupta, Pekon
2014-07-16 6:05 ` Artem Bityutskiy
0 siblings, 2 replies; 3+ messages in thread
From: Atlant Schmidt @ 2014-07-03 14:07 UTC (permalink / raw)
To: 'linux-mtd@lists.infradead.org'; +Cc: Andrew Coll, Cale Surgen
Folks:
Within the UBI layer, where is the threshold set that
determines how many bit-flips must occur on a read
before the block is "scrubbed" (stored into another
location)?
And is this done on a page-by-page basis or on a
whole-LEB/PEB basis? That is, if a single page has
more than threshold number of bit flips, will just
that page be relocated or will the entire LEB be
relocated to another PEB? (I'd assume the later
because that's the level at which UBI understands
the organization of the storage.)
Also:
It's a shame there doesn't seem to be a UBI ioctl()
to control this; it would be nice to be able to run
routinely with the threshold set high but be able to
easily enter "scrubbing" mode where even single bit-
flips could be scrubbed away.
I've notice that our NAND flashes acquire persistent
bit flips and I'd love to be able to scrub those blocks
clean by just temporarily setting the threshold low and
then reading through the whole device (and watching the
ECC statistics to see when I should stop).
This would make the NAND more immune to suddenly ending
up with too many bit flips for the ECC to correct.
Atlant
This e-mail and the information, including any attachments it contains, are intended to be a confidential communication only to the person or entity to whom it is addressed and may contain information that is privileged. If the reader of this message is not the intended recipient, you are hereby notified that any dissemination, distribution or copying of this communication is strictly prohibited. If you have received this communication in error, please immediately notify the sender and destroy the original message.
Thank you.
Please consider the environment before printing this email.
^ permalink raw reply [flat|nested] 3+ messages in thread* RE: Where is the "scrubbing" threshold set in UBI? Can it be easily varied?
2014-07-03 14:07 Where is the "scrubbing" threshold set in UBI? Can it be easily varied? Atlant Schmidt
@ 2014-07-04 4:40 ` Gupta, Pekon
2014-07-16 6:05 ` Artem Bityutskiy
1 sibling, 0 replies; 3+ messages in thread
From: Gupta, Pekon @ 2014-07-04 4:40 UTC (permalink / raw)
To: Atlant Schmidt, 'linux-mtd@lists.infradead.org'
Cc: Andrew Coll, Cale Surgen
>From: Atlant Schmidt
>
>Folks:
>
> Within the UBI layer, where is the threshold set that
> determines how many bit-flips must occur on a read
> before the block is "scrubbed" (stored into another
> location)?
>
> And is this done on a page-by-page basis or on a
> whole-LEB/PEB basis? That is, if a single page has
> more than threshold number of bit flips, will just
> that page be relocated or will the entire LEB be
> relocated to another PEB? (I'd assume the later
> because that's the level at which UBI understands
> the organization of the storage.)
>
> Also:
>
> It's a shame there doesn't seem to be a UBI ioctl()
> to control this; it would be nice to be able to run
> routinely with the threshold set high but be able to
> easily enter "scrubbing" mode where even single bit-
> flips could be scrubbed away.
>
No, it's not at all shameful, Instead NAND framework gives controllability
to set bitflip threshold via following sysfs entry.
$KERNEL/Documentation/ABI/testing/sysfs-class-mtd
/sys/class/mtd/mtdX/bitflip_threshold
And there patch for observing the bitflips via sysfs too.
[PATCH v3 0/3] mtd: Add sysfs entries and account BBT blocks properly
http://lists.infradead.org/pipermail/linux-mtd/2014-June/054376.html
with regards, pekon
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Where is the "scrubbing" threshold set in UBI? Can it be easily varied?
2014-07-03 14:07 Where is the "scrubbing" threshold set in UBI? Can it be easily varied? Atlant Schmidt
2014-07-04 4:40 ` Gupta, Pekon
@ 2014-07-16 6:05 ` Artem Bityutskiy
1 sibling, 0 replies; 3+ messages in thread
From: Artem Bityutskiy @ 2014-07-16 6:05 UTC (permalink / raw)
To: Atlant Schmidt
Cc: Andrew Coll, 'linux-mtd@lists.infradead.org', Cale Surgen
On Thu, 2014-07-03 at 10:07 -0400, Atlant Schmidt wrote:
> Folks:
>
> Within the UBI layer, where is the threshold set that
> determines how many bit-flips must occur on a read
> before the block is "scrubbed" (stored into another
> location)?
Are you now talking about the MTD layer, and the amount of bits
corrected by an ECC? In that case, see what Pekon answered. There is a
configurable threshold and MTD won't tell UBI that there were bit-flips
unless the amount of bits corrected in an ECC "step" is greater or
equivalent to the threshold. This is documented.
> And is this done on a page-by-page basis or on a
> whole-LEB/PEB basis?
On the MTD/NAND driver level, there is a notion of ECC step. One NAND
page may consist of a single or multiple ECC steps...
UBI has no idea about ECC steps, though. It just schedules a PEB for
scrubbing if it gets -EUNCLEAN from MTD when it reads the PEB.
> That is, if a single page has
> more than threshold number of bit flips, will just
> that page be relocated or will the entire LEB be
> relocated to another PEB?
Entire PEB will be copied to another PEB, and the LEB will be re-mapped
from the old PEB to the new PEB, and the old PEB will be erased.
--
Best Regards,
Artem Bityutskiy
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2014-07-16 6:06 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-07-03 14:07 Where is the "scrubbing" threshold set in UBI? Can it be easily varied? Atlant Schmidt
2014-07-04 4:40 ` Gupta, Pekon
2014-07-16 6:05 ` Artem Bityutskiy
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox