public inbox for linux-mtd@lists.infradead.org
 help / color / mirror / Atom feed
* [PATCH v2] mtd: gpmi: Bitflip support in erased regions
@ 2013-12-15 18:44 Elie De Brauwer
  2013-12-15 18:44 ` [PATCH v2] mtd: gpmi: Deal with bitflips in erased regions regions Elie De Brauwer
  0 siblings, 1 reply; 12+ messages in thread
From: Elie De Brauwer @ 2013-12-15 18:44 UTC (permalink / raw)
  To: b32955, dwmw2, dedekind1, computersforpeace; +Cc: Elie De Brauwer, linux-mtd

Hello All,

This is version 2 of my patch for gpmi-nand which corrects bitflips in 
erased regions by correcting them in software.  Thanks to Huagn Shijie's
feedback I added a 'fast'-path and a 'slow'-path for erased blocks. 
Apparently the BCH's block's HW_BCH_STATUS0:ALLONES contains a bit which
indicates if the last block consisted out of all ones or not. This allows
us to easily discriminate between a read transaction of an erase block which 
requires fixing and a read transaction which does not require fixing. 

I did some benchmark testing (dd if=/dev/mtd1 of=/dev/null bs=1M) and 
on my i.MX28 platform the performance of this patch is close to the 
original version of the gpmi-nand driver (as currently present in 
3.9 vanilla). While my original version of the patch where all erased 
blocks where soft-corrected showed a 20% performance penalty. (One could
argue the performance penalty is a non-issue since the upper layer should 
be intelligent enough not to start reading empty pages, or at least not
at a very high frequency).

I'm currently still awaiting feedback of Huang Shijie regarding the setting
for BM_BCH_MODE_ERASE_THRESHOLD. Which I currently set to bch strength, 
since I think that from a regular block with bitflips the BCH block should 
be able to correct up to this level.

Feedback/comments welcome.


Elie De Brauwer (1):
  mtd: gpmi: Deal with bitflips in erased regions regions

 drivers/mtd/nand/gpmi-nand/bch-regs.h  |    2 ++
 drivers/mtd/nand/gpmi-nand/gpmi-lib.c  |   17 +++++++++++++
 drivers/mtd/nand/gpmi-nand/gpmi-nand.c |   43 +++++++++++++++++++++++++++++---
 drivers/mtd/nand/gpmi-nand/gpmi-nand.h |    1 +
 4 files changed, 60 insertions(+), 3 deletions(-)

-- 
1.7.10.4

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

end of thread, other threads:[~2013-12-17  7:11 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-12-15 18:44 [PATCH v2] mtd: gpmi: Bitflip support in erased regions Elie De Brauwer
2013-12-15 18:44 ` [PATCH v2] mtd: gpmi: Deal with bitflips in erased regions regions Elie De Brauwer
2013-12-16  4:30   ` Huang Shijie
2013-12-16  9:43     ` Elie De Brauwer
2013-12-16 13:00       ` Huang Shijie
2013-12-16 13:14         ` Elie De Brauwer
2013-12-17  2:23           ` Huang Shijie
2013-12-17  2:29           ` Huang Shijie
2013-12-17  2:37           ` Huang Shijie
2013-12-17  6:35             ` Elie De Brauwer
2013-12-17  7:10     ` Brian Norris
2013-12-17  3:50   ` Huang Shijie

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox