Linux-mtd Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Zhihao Cheng <chengzhihao1@huawei.com>
To: Ran Hongyun <ranhongyun1@huawei.com>, <richard@nod.at>,
	<miquel.raynal@bootlin.com>, <vigneshr@ti.com>,
	<vapier@gentoo.org>, <artem.bityutskiy@linux.intel.com>
Cc: <linux-mtd@lists.infradead.org>, <linux-kernel@vger.kernel.org>,
	<yangerkun@huawei.com>, <yi.zhang@huawei.com>
Subject: Re: [PATCH 2/2] UBI: support per-device wear-leveling threshold
Date: Thu, 23 Jul 2026 11:01:06 +0800	[thread overview]
Message-ID: <7971d65d-ae24-d508-23ff-52afdc0b8d09@huawei.com> (raw)
In-Reply-To: <20260723020233.3079997-3-ranhongyun1@huawei.com>

在 2026/7/23 10:02, Ran Hongyun 写道:
> The UBI wear-leveling threshold (CONFIG_MTD_UBI_WL_THRESHOLD) is
> currently a compile-time constant shared by all UBI devices. When a
> single kernel image must support multiple NAND flashes with different
> erase lifetimes, one global threshold cannot suit all devices.
> 
> Add a per-device configurable wl_threshold parameter:
> 
>    - UAPI: add __s32 wl_threshold to struct ubi_attach_req, carved
>      from the existing padding.
> 
>    - Module parameter: ubi.mtd gains a new optional token
>      "wl_threshold":
>        ubi.mtd=0,0,0,0,0,0,256  ubi.mtd=1,0,0,0,0,0,4096
> 
> 0 means "use the kernel default", the accepted range is
> 2-65536.
> 
> Signed-off-by: Ran Hongyun <ranhongyun1@huawei.com>
> ---
>   drivers/mtd/ubi/build.c      | 43 ++++++++++++++++++++++++++++++------
>   drivers/mtd/ubi/cdev.c       |  2 +-
>   drivers/mtd/ubi/fastmap-wl.c |  8 +++----
>   drivers/mtd/ubi/ubi.h        | 21 +++++++++++++++++-
>   drivers/mtd/ubi/wl.c         | 39 ++++++++------------------------
>   include/uapi/mtd/ubi-user.h  | 10 ++++++++-
>   6 files changed, 79 insertions(+), 44 deletions(-)
> 

Reviewed-by: Zhihao Cheng <chengzhihao1@huawei.com>

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

  reply	other threads:[~2026-07-23  3:01 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-23  2:02 [PATCH 0/2] UBI: fix ubi.mtd MODULE_PARM_DESC issues and add per-device wear-leveling threshold Ran Hongyun
2026-07-23  2:02 ` [PATCH 1/2] UBI: fix two issues in the ubi.mtd MODULE_PARM_DESC Ran Hongyun
2026-07-23  2:40   ` Zhihao Cheng
2026-07-23  2:02 ` [PATCH 2/2] UBI: support per-device wear-leveling threshold Ran Hongyun
2026-07-23  3:01   ` Zhihao Cheng [this message]
2026-07-23  6:06   ` Ran Hongyun
2026-07-23  7:19     ` Richard Weinberger
2026-07-23  8:16   ` Ran Hongyun
2026-07-23  8:30     ` Richard Weinberger

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=7971d65d-ae24-d508-23ff-52afdc0b8d09@huawei.com \
    --to=chengzhihao1@huawei.com \
    --cc=artem.bityutskiy@linux.intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mtd@lists.infradead.org \
    --cc=miquel.raynal@bootlin.com \
    --cc=ranhongyun1@huawei.com \
    --cc=richard@nod.at \
    --cc=vapier@gentoo.org \
    --cc=vigneshr@ti.com \
    --cc=yangerkun@huawei.com \
    --cc=yi.zhang@huawei.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