All of lore.kernel.org
 help / color / mirror / Atom feed
From: Miquel Raynal <miquel.raynal@bootlin.com>
To: Cheng Ming Lin <linchengming884@gmail.com>
Cc: vigneshr@ti.com,  linux-mtd@lists.infradead.org,
	linux-kernel@vger.kernel.org,  richard@nod.at,
	 alvinzhou@mxic.com.tw, leoyu@mxic.com.tw,
	 Cheng Ming Lin <chengminglin@mxic.com.tw>
Subject: Re: [PATCH 2/2] mtd: spi-nand: macronix: Add randomizer support
Date: Fri, 05 Sep 2025 16:08:58 +0200	[thread overview]
Message-ID: <874ithm1ol.fsf@bootlin.com> (raw)
In-Reply-To: <CAAyq3Saj5cmHAb3NPd=ZzJEvYD873s2CFKOyoxMrKk6Tj6yakg@mail.gmail.com> (Cheng Ming Lin's message of "Fri, 5 Sep 2025 09:14:40 +0800")

Hello,

On 05/09/2025 at 09:14:40 +08, Cheng Ming Lin <linchengming884@gmail.com> wrote:

> Hi Miquel,
>
> Miquel Raynal <miquel.raynal@bootlin.com> 於 2025年8月18日 週一 下午4:47寫道:
>>
>> Hi Chang Ming,
>>
>> On 11/08/2025 at 11:01:25 +08, Cheng Ming Lin <linchengming884@gmail.com> wrote:
>>
>> > Hi Miquel,
>> >
>> > Miquel Raynal <miquel.raynal@bootlin.com> 於 2025年8月8日 週五 下午6:19寫道:
>> >>
>> >> On 08/08/2025 at 17:55:03 +08, Cheng Ming Lin <linchengming884@gmail.com> wrote:
>> >>
>> >> > From: Cheng Ming Lin <chengminglin@mxic.com.tw>
>> >> >
>> >> > Enable randomizer function by specific flowchart to set the default value
>> >> > of RANDEN to 1.
>> >> >
>> >> > Randomizer introduces two new DT properties for child nodes to configure
>> >> > the randomizer functionality and coverage options.
>> >> >  - mxic,enable-randomizer-otp: Specify whether to activate the randomizer
>> >> >                                feature.
>> >> >  - mxic,randopt: Define the randomizer area per page.
>> >>
>> >> Can we create a global NAND DT property for that? Enabling a randomizer
>> >> is quite a generic step.
>> >>
>> >> > The penalty of randomizer are subpage accesses prohibited and more time
>> >> > period is needed in program operation and entering deep power-down mode.
>> >> > i.e., tPROG 320us to 360us (randomizer enabled).
>> >>
>> >> Do you want to share what is the added value in terms of lifetime to
>> >> enable the randomizer, given the drawbacks which are significant?
>> >
>> > The randomizer mainly targets extremely unbalanced data patterns,
>> > which might potentially lead to data errors.
>> >
>> > Please refer to the attached document:
>> > https://www.mxic.com.tw/Lists/ApplicationNote/Attachments/2151/AN1051V1-The%20Introduction%20of%20Randomizer%20Feature%20on%20MX30xFxG28AD_MX35xFxG24AD.pdf
>>
>> Thanks for the link, it may be pointed with a "Link:" tag in your commit
>> to further justify this addition. However it is sparse on details. I
>> would be interested by more details, such as "how many 0s? how many
>> bitflips? how often/likely?"
>
> Thank you for your feedback. Unfortunately we do not have numerical
> data such as exact numbers of '0's, bitflip rates, or occurrence
> probabilities to share. Instead, I would like to refer to the JEDEC
> JESD22-A117E qualification standard, which provides guidance on
> retention and endurance testing.
>
> According to this document, there is no single data pattern that
> represents a universal worst-case across all failure mechanisms.
> Different mechanisms may stress programmed cells, erased cells, or
> cells influenced by adjacent states, and thus specific patterns such
> as fully programmed, checkerboard, or mostly erased are each only
> worst-case for certain designs or processes.
>
> Given that no fixed pattern can cover all cases, the use of a
> randomized data pattern is considered a practical mitigation
> strategy. A randomizer distributes stress more evenly across the
> device by scrambling incoming data before storage and restoring it
> on read. This helps reduce pattern-dependent degradation and can
> therefore improve long-term flash reliability.

Thanks for the details. I guess you can add a bit of them to your commit
log as well. I'll welcome a v2 with the previous comments addressed!

Thanks,
Miquèl

______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/

WARNING: multiple messages have this Message-ID (diff)
From: Miquel Raynal <miquel.raynal@bootlin.com>
To: Cheng Ming Lin <linchengming884@gmail.com>
Cc: vigneshr@ti.com,  linux-mtd@lists.infradead.org,
	linux-kernel@vger.kernel.org,  richard@nod.at,
	 alvinzhou@mxic.com.tw, leoyu@mxic.com.tw,
	 Cheng Ming Lin <chengminglin@mxic.com.tw>
Subject: Re: [PATCH 2/2] mtd: spi-nand: macronix: Add randomizer support
Date: Fri, 05 Sep 2025 16:08:58 +0200	[thread overview]
Message-ID: <874ithm1ol.fsf@bootlin.com> (raw)
In-Reply-To: <CAAyq3Saj5cmHAb3NPd=ZzJEvYD873s2CFKOyoxMrKk6Tj6yakg@mail.gmail.com> (Cheng Ming Lin's message of "Fri, 5 Sep 2025 09:14:40 +0800")

Hello,

On 05/09/2025 at 09:14:40 +08, Cheng Ming Lin <linchengming884@gmail.com> wrote:

> Hi Miquel,
>
> Miquel Raynal <miquel.raynal@bootlin.com> 於 2025年8月18日 週一 下午4:47寫道:
>>
>> Hi Chang Ming,
>>
>> On 11/08/2025 at 11:01:25 +08, Cheng Ming Lin <linchengming884@gmail.com> wrote:
>>
>> > Hi Miquel,
>> >
>> > Miquel Raynal <miquel.raynal@bootlin.com> 於 2025年8月8日 週五 下午6:19寫道:
>> >>
>> >> On 08/08/2025 at 17:55:03 +08, Cheng Ming Lin <linchengming884@gmail.com> wrote:
>> >>
>> >> > From: Cheng Ming Lin <chengminglin@mxic.com.tw>
>> >> >
>> >> > Enable randomizer function by specific flowchart to set the default value
>> >> > of RANDEN to 1.
>> >> >
>> >> > Randomizer introduces two new DT properties for child nodes to configure
>> >> > the randomizer functionality and coverage options.
>> >> >  - mxic,enable-randomizer-otp: Specify whether to activate the randomizer
>> >> >                                feature.
>> >> >  - mxic,randopt: Define the randomizer area per page.
>> >>
>> >> Can we create a global NAND DT property for that? Enabling a randomizer
>> >> is quite a generic step.
>> >>
>> >> > The penalty of randomizer are subpage accesses prohibited and more time
>> >> > period is needed in program operation and entering deep power-down mode.
>> >> > i.e., tPROG 320us to 360us (randomizer enabled).
>> >>
>> >> Do you want to share what is the added value in terms of lifetime to
>> >> enable the randomizer, given the drawbacks which are significant?
>> >
>> > The randomizer mainly targets extremely unbalanced data patterns,
>> > which might potentially lead to data errors.
>> >
>> > Please refer to the attached document:
>> > https://www.mxic.com.tw/Lists/ApplicationNote/Attachments/2151/AN1051V1-The%20Introduction%20of%20Randomizer%20Feature%20on%20MX30xFxG28AD_MX35xFxG24AD.pdf
>>
>> Thanks for the link, it may be pointed with a "Link:" tag in your commit
>> to further justify this addition. However it is sparse on details. I
>> would be interested by more details, such as "how many 0s? how many
>> bitflips? how often/likely?"
>
> Thank you for your feedback. Unfortunately we do not have numerical
> data such as exact numbers of '0's, bitflip rates, or occurrence
> probabilities to share. Instead, I would like to refer to the JEDEC
> JESD22-A117E qualification standard, which provides guidance on
> retention and endurance testing.
>
> According to this document, there is no single data pattern that
> represents a universal worst-case across all failure mechanisms.
> Different mechanisms may stress programmed cells, erased cells, or
> cells influenced by adjacent states, and thus specific patterns such
> as fully programmed, checkerboard, or mostly erased are each only
> worst-case for certain designs or processes.
>
> Given that no fixed pattern can cover all cases, the use of a
> randomized data pattern is considered a practical mitigation
> strategy. A randomizer distributes stress more evenly across the
> device by scrambling incoming data before storage and restoring it
> on read. This helps reduce pattern-dependent degradation and can
> therefore improve long-term flash reliability.

Thanks for the details. I guess you can add a bit of them to your commit
log as well. I'll welcome a v2 with the previous comments addressed!

Thanks,
Miquèl

  reply	other threads:[~2025-09-05 18:19 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-08-08  9:55 [PATCH 0/2] Add support for randomizer Cheng Ming Lin
2025-08-08  9:55 ` Cheng Ming Lin
2025-08-08  9:55 ` [PATCH 1/2] mtd: spi-nand: " Cheng Ming Lin
2025-08-08  9:55   ` Cheng Ming Lin
2025-08-08 10:15   ` Miquel Raynal
2025-08-08 10:15     ` Miquel Raynal
2025-08-08 11:35     ` Cheng Ming Lin
2025-08-08 11:35       ` Cheng Ming Lin
2025-08-08  9:55 ` [PATCH 2/2] mtd: spi-nand: macronix: Add randomizer support Cheng Ming Lin
2025-08-08  9:55   ` Cheng Ming Lin
2025-08-08 10:19   ` Miquel Raynal
2025-08-08 10:19     ` Miquel Raynal
2025-08-08 11:49     ` Cheng Ming Lin
2025-08-08 11:49       ` Cheng Ming Lin
2025-08-11  3:01     ` Cheng Ming Lin
2025-08-11  3:01       ` Cheng Ming Lin
2025-08-18  8:47       ` Miquel Raynal
2025-08-18  8:47         ` Miquel Raynal
2025-09-05  1:14         ` Cheng Ming Lin
2025-09-05  1:14           ` Cheng Ming Lin
2025-09-05 14:08           ` Miquel Raynal [this message]
2025-09-05 14:08             ` Miquel Raynal

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=874ithm1ol.fsf@bootlin.com \
    --to=miquel.raynal@bootlin.com \
    --cc=alvinzhou@mxic.com.tw \
    --cc=chengminglin@mxic.com.tw \
    --cc=leoyu@mxic.com.tw \
    --cc=linchengming884@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mtd@lists.infradead.org \
    --cc=richard@nod.at \
    --cc=vigneshr@ti.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 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.