Where is the "scrubbing" threshold set in UBI? Can it be easily varied?

Gupta, Pekon pekon at ti.com
Thu Jul 3 21:40:26 PDT 2014


>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



More information about the linux-mtd mailing list