From: Ivan Djelic <ivan.djelic@parrot.com>
To: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
Cc: "linux-mtd@lists.infradead.org" <linux-mtd@lists.infradead.org>,
Sascha Hauer <s.hauer@pengutronix.de>,
Mike Dunn <mikedunn@newsguy.com>,
Shmulik Ladkani <shmulik.ladkani@gmail.com>
Subject: Re: flash bbt broken due to unitialized bitflip_threshold?
Date: Wed, 6 Jun 2012 19:55:07 +0200 [thread overview]
Message-ID: <20120606175507.GC17332@parrot.com> (raw)
In-Reply-To: <1338997575.6875.72.camel@sauron.fi.intel.com>
On Wed, Jun 06, 2012 at 04:46:15PM +0100, Artem Bityutskiy wrote:
> On Wed, 2012-06-06 at 18:15 +0300, Shmulik Ladkani wrote:
> > - By 'add_mtd_device'. Here it defaults to 'ecc_strength' if NOT
> > previously set by the driver.
>
> But this is wrong. If I use the old doc2000 driver, with ecc_strength =
> 2, and it works fine for me, and I am happy that UBI scrubs for a single
> bit-flip, why should my system become broken because someone decided
> that now UBI should start scrubbing on 2 bit-flips?
>
> We should not change the defaults - if I do not set the threshold via
> sysfs of in the driver, it should be 1.
>
> Unless I am completely confused, we should change this, CC -stable if
> needed, and ask dwmw2 to merge that.
>
Hi Artem,
The "safest" bitflip_threshold value actually depends on the nand device you are using.
If I want to use today's 4-bit and 8-bit nand devices, a threshold of 1
will make my system unusable (because of constant scrubbing and block torturing).
The rationale behind Mike's patch is that it should be safe to delay block scrubbing
until the nand controller has reached its maximum correction capability; at this point,
any additional bitflip would produce uncorrectable errors, so scrubbing is necessary.
This is the recommended policy in nand datasheets when the device ecc requirement matches
the controller capability. In your doc2000 example, why would it break with a threshold of 2 ?
On the other hand, I agree that we should not force this kind of changes on existing systems.
Let us list use cases:
1. on legacy systems with 1-bit nand and strength = 1, default bitflip_threshold is 1
2. on legacy systems with 1-bit nand and strength > 1, default bitflip_threshold is 'strength'
3. on new systems with 2+ bit nand and strength > 1, default bitflip_threshold is 'strength'
Case 1 is OK, no change.
Case 2 introduces an unwanted change.
Case 3 (which was not properly handled until Mike's patch) seems OK to me, it fits current datasheet
requirements and the driver still has the possibility to explicitly set bitflip_threshold on a
per-board basis (because it really depends on the nand device).
So rather than reverting to a default bitflip_threshold of 1 for everyone, I suggest we revert the
change on case 2 legacy systems like the doc2000 by explicitly setting bitflip_threshold to 1 in the driver.
What do you think ?
BR,
--
Ivan Djelic
next prev parent reply other threads:[~2012-06-06 17:56 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-06-05 22:06 flash bbt broken due to unitialized bitflip_threshold? Sascha Hauer
2012-06-06 9:50 ` Shmulik Ladkani
2012-06-06 13:30 ` Artem Bityutskiy
2012-06-06 15:15 ` Shmulik Ladkani
2012-06-06 15:46 ` Artem Bityutskiy
2012-06-06 16:08 ` Shmulik Ladkani
2012-06-06 17:55 ` Ivan Djelic [this message]
2012-06-07 7:36 ` Artem Bityutskiy
2012-06-07 14:02 ` Shmulik Ladkani
2012-06-07 17:34 ` Mike Dunn
2012-06-07 21:07 ` Shmulik Ladkani
2012-06-10 7:08 ` Shmulik Ladkani
2012-06-22 20:39 ` Brian Norris
2012-06-25 17:44 ` Mike Dunn
2012-06-07 7:43 ` Artem Bityutskiy
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20120606175507.GC17332@parrot.com \
--to=ivan.djelic@parrot.com \
--cc=artem.bityutskiy@linux.intel.com \
--cc=linux-mtd@lists.infradead.org \
--cc=mikedunn@newsguy.com \
--cc=s.hauer@pengutronix.de \
--cc=shmulik.ladkani@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox