All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/3] mtd: rawnand: micron: Get the actual number of bitflips
@ 2018-07-03 12:17 Boris Brezillon
  2018-07-03 12:21 ` Boris Brezillon
  0 siblings, 1 reply; 4+ messages in thread
From: Boris Brezillon @ 2018-07-03 12:17 UTC (permalink / raw)
  To: Boris Brezillon, Richard Weinberger, Miquel Raynal, linux-mtd
  Cc: David Woodhouse, Brian Norris, Marek Vasut, Bean Huo, Chris Packham

Hello,

Back when support for Micron 4bit/512byte on-die ECC was added, we
decided that it wasn't worth retrieving the real number of bitflips
when the chip was returning WRITE_RECOMMENDED and instead decided to
always return the maximum value (ECC strength).

This decision leads to UBI moving eraseblocks around as soon as 1
bitflip is present, which is far from optimal, and might wear the NAND
out faster than if we get the actual number of bitflips by re-reading
the page in raw mode and comparing its content to the corrected
version.

IIRC, Bean warned us about that, but it seems we didn't listen, so now
is time to revisit the implementation and implement what Bean initially
suggested.

This implementation has been tested on an MT29F2G08ABAEAH4, and seems
to work as expected (nandbiterrs works fine, and the real number of
bitflips is now returned).

Here are some details about these patches:
Patch 1 is just a cleanup to avoid passing parameters we don't need to
the ecc_status() functions. Patch 2 is preparing things for the actual
changes by reworking the ordering in the read function, and patch 3 is
implementing the read-in-raw-mode-and-compare logic.

Regards,

Boris

Boris Brezillon (3):
  mtd: rawnand: micron: Stop passing an mtd_info object to ecc_status
    funcs
  mtd: rawnand: micron: Disable ECC earlier in the read path
  mtd: rawnand: micron: Get the actual number of bitflips

 drivers/mtd/nand/raw/nand_micron.c | 145 ++++++++++++++++++++++++++++++-------
 1 file changed, 120 insertions(+), 25 deletions(-)

-- 
2.14.1

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH 0/3] mtd: rawnand: micron: Get the actual number of bitflips
  2018-07-03 12:17 [PATCH 0/3] mtd: rawnand: micron: Get the actual number of bitflips Boris Brezillon
@ 2018-07-03 12:21 ` Boris Brezillon
  0 siblings, 0 replies; 4+ messages in thread
From: Boris Brezillon @ 2018-07-03 12:21 UTC (permalink / raw)
  To: Boris Brezillon, Richard Weinberger, Miquel Raynal, linux-mtd
  Cc: David Woodhouse, Brian Norris, Marek Vasut, Bean Huo, Chris Packham



On Tue,  3 Jul 2018 14:17:37 +0200
Boris Brezillon <boris.brezillon@bootlin.com> wrote:

> Hello,
> 
> Back when support for Micron 4bit/512byte on-die ECC was added, we
> decided that it wasn't worth retrieving the real number of bitflips
> when the chip was returning WRITE_RECOMMENDED and instead decided to
> always return the maximum value (ECC strength).
> 
> This decision leads to UBI moving eraseblocks around as soon as 1
> bitflip is present, which is far from optimal, and might wear the NAND
> out faster than if we get the actual number of bitflips by re-reading
> the page in raw mode and comparing its content to the corrected
> version.
> 
> IIRC, Bean warned us about that, but it seems we didn't listen, so now
> is time to revisit the implementation and implement what Bean initially
> suggested.
> 
> This implementation has been tested on an MT29F2G08ABAEAH4, and seems
> to work as expected (nandbiterrs works fine, and the real number of
> bitflips is now returned).
> 
> Here are some details about these patches:
> Patch 1 is just a cleanup to avoid passing parameters we don't need to
> the ecc_status() functions. Patch 2 is preparing things for the actual
> changes by reworking the ordering in the read function, and patch 3 is
> implementing the read-in-raw-mode-and-compare logic.

Please ignore this cover letter. I just sent a new version, this time
with the patches.

Sorry for the noise.

Boris

> 
> Regards,
> 
> Boris
> 
> Boris Brezillon (3):
>   mtd: rawnand: micron: Stop passing an mtd_info object to ecc_status
>     funcs
>   mtd: rawnand: micron: Disable ECC earlier in the read path
>   mtd: rawnand: micron: Get the actual number of bitflips
> 
>  drivers/mtd/nand/raw/nand_micron.c | 145 ++++++++++++++++++++++++++++++-------
>  1 file changed, 120 insertions(+), 25 deletions(-)
> 

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH 0/3] mtd: rawnand: micron: Get the actual number of bitflips
  2018-07-03 12:20 Boris Brezillon
@ 2018-07-08 21:48 ` Miquel Raynal
  0 siblings, 0 replies; 4+ messages in thread
From: Miquel Raynal @ 2018-07-08 21:48 UTC (permalink / raw)
  To: Boris Brezillon
  Cc: Richard Weinberger, linux-mtd, David Woodhouse, Brian Norris,
	Marek Vasut, Bean Huo, Chris Packham

Hi Boris,

Boris Brezillon <boris.brezillon@bootlin.com> wrote on Tue,  3 Jul 2018
14:20:06 +0200:

> Hello,
> 
> Back when support for Micron 4bit/512byte on-die ECC was added, we
> decided that it wasn't worth retrieving the real number of bitflips
> when the chip was returning WRITE_RECOMMENDED and instead decided to
> always return the maximum value (ECC strength).
> 
> This decision leads to UBI moving eraseblocks around as soon as 1
> bitflip is present, which is far from optimal, and might wear the NAND
> out faster than if we get the actual number of bitflips by re-reading
> the page in raw mode and comparing its content to the corrected
> version.
> 
> IIRC, Bean warned us about that, but it seems we didn't listen, so now
> is time to revisit the implementation and implement what Bean initially
> suggested.
> 
> This implementation has been tested on an MT29F2G08ABAEAH4, and seems
> to work as expected (nandbiterrs works fine, and the real number of
> bitflips is now returned).
> 
> Here are some details about these patches:
> Patch 1 is just a cleanup to avoid passing parameters we don't need to
> the ecc_status() functions. Patch 2 is preparing things for the actual
> changes by reworking the ordering in the read function, and patch 3 is
> implementing the read-in-raw-mode-and-compare logic.
> 
> Regards,
> 
> Boris
> 
> Boris Brezillon (3):
>   mtd: rawnand: micron: Stop passing mtd to ecc_status() funcs
>   mtd: rawnand: micron: Disable ECC earlier in the read path
>   mtd: rawnand: micron: Get the actual number of bitflips
> 
>  drivers/mtd/nand/raw/nand_micron.c | 145 ++++++++++++++++++++++++++++++-------
>  1 file changed, 120 insertions(+), 25 deletions(-)
> 


Series applied to nand/next.

Thanks,
Miquèl

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [PATCH 0/3] mtd: rawnand: micron: Get the actual number of bitflips
@ 2018-07-03 12:20 Boris Brezillon
  2018-07-08 21:48 ` Miquel Raynal
  0 siblings, 1 reply; 4+ messages in thread
From: Boris Brezillon @ 2018-07-03 12:20 UTC (permalink / raw)
  To: Boris Brezillon, Richard Weinberger, Miquel Raynal, linux-mtd
  Cc: David Woodhouse, Brian Norris, Marek Vasut, Bean Huo, Chris Packham

Hello,

Back when support for Micron 4bit/512byte on-die ECC was added, we
decided that it wasn't worth retrieving the real number of bitflips
when the chip was returning WRITE_RECOMMENDED and instead decided to
always return the maximum value (ECC strength).

This decision leads to UBI moving eraseblocks around as soon as 1
bitflip is present, which is far from optimal, and might wear the NAND
out faster than if we get the actual number of bitflips by re-reading
the page in raw mode and comparing its content to the corrected
version.

IIRC, Bean warned us about that, but it seems we didn't listen, so now
is time to revisit the implementation and implement what Bean initially
suggested.

This implementation has been tested on an MT29F2G08ABAEAH4, and seems
to work as expected (nandbiterrs works fine, and the real number of
bitflips is now returned).

Here are some details about these patches:
Patch 1 is just a cleanup to avoid passing parameters we don't need to
the ecc_status() functions. Patch 2 is preparing things for the actual
changes by reworking the ordering in the read function, and patch 3 is
implementing the read-in-raw-mode-and-compare logic.

Regards,

Boris

Boris Brezillon (3):
  mtd: rawnand: micron: Stop passing mtd to ecc_status() funcs
  mtd: rawnand: micron: Disable ECC earlier in the read path
  mtd: rawnand: micron: Get the actual number of bitflips

 drivers/mtd/nand/raw/nand_micron.c | 145 ++++++++++++++++++++++++++++++-------
 1 file changed, 120 insertions(+), 25 deletions(-)

-- 
2.14.1

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2018-07-08 21:48 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-07-03 12:17 [PATCH 0/3] mtd: rawnand: micron: Get the actual number of bitflips Boris Brezillon
2018-07-03 12:21 ` Boris Brezillon
2018-07-03 12:20 Boris Brezillon
2018-07-08 21:48 ` Miquel Raynal

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.