[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAA_RMS52nYO=XqQH9VkCDTC=OrrCLSAcXXeR41qCKNNVLzzi5g@mail.gmail.com>
Date: Wed, 4 Jun 2025 18:51:06 -0700
From: David Regan <dregan@...adcom.com>
To: Miquel Raynal <miquel.raynal@...tlin.com>
Cc: David Regan <dregan@...adcom.com>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>, linux-mtd@...ts.infradead.org,
bcm-kernel-feedback-list@...adcom.com,
William Zhang <william.zhang@...adcom.com>, Anand Gore <anand.gore@...adcom.com>,
Florian Fainelli <florian.fainelli@...adcom.com>, Kamal Dasu <kamal.dasu@...adcom.com>,
Dan Beygelman <dan.beygelman@...adcom.com>, Álvaro Fernández Rojas <noltari@...il.com>,
rafal@...ecki.pl, computersforpeace@...il.com, frieder.schrempf@...tron.de,
Vignesh Raghavendra <vigneshr@...com>, Richard Weinberger <richard@....at>,
Boris Brezillon <bbrezillon@...nel.org>, kdasu.kdev@...il.com,
JaimeLiao <jaimeliao.tw@...il.com>, Adam Borowski <kilobyte@...band.pl>,
Jonas Gorski <jonas.gorski@...il.com>, dgcbueu@...il.com, dregan@...l.com
Subject: Re: [PATCH] mtd: nand: brcmnand: fix mtd corrected bits stat
Hi Miquèl,
On Mon, Jun 2, 2025 at 7:19 AM Miquel Raynal <miquel.raynal@...tlin.com> wrote:
>
> On 29/05/2025 at 20:46:59 -07, David Regan <dregan@...adcom.com> wrote:
>
> > Currently we attempt to get the amount of flipped bits from a hardware
> > location which is reset on every subpage. Instead obtain total flipped
> > bits stat from hardware accumulator. In addition identify the correct
> > maximum subpage corrected bits.
>
> This change does not feel correct. We gather two statistics:
> - the maximum number of bitflips corrected in a single ECC chunk
> - the total number of bitflips among the whole page
>
> The most important one is the former, because it may trigger wear
> levelling from the top layer (UBI, usually). It feels like you are
> breaking this, am I wrong? Would you mind to be more explicit otherwise?
Detecting the maximum number of bitflips corrected in a single subpage
(ECC chunk) doesn't work correctly, however the code will still
trigger an EUCLEAN since we return max(mtd->bitflip_threshold,
corrected) . My fix is to accurately report the maximum number of bit
flips per subpage, in addition to counting the total bit flips per
whole page to update the mtd corrected bits stat.
>
> Thanks,
> Miquèl
-Dave
Powered by blists - more mailing lists