public inbox for linux-mtd@lists.infradead.org
 help / color / mirror / Atom feed
From: Richard Weinberger <richard@nod.at>
To: Rickard X Andersson <rickard.andersson@axis.com>
Cc: chengzhihao1 <chengzhihao1@huawei.com>,
	 linux-mtd <linux-mtd@lists.infradead.org>,
	 rickard314 andersson <rickard314.andersson@gmail.com>,
	 kernel <kernel@axis.com>
Subject: Re: [PATCH v3 02/10] ubi: Expose mean erase counter for fastmap in sysfs
Date: Wed, 6 Nov 2024 21:20:26 +0100 (CET)	[thread overview]
Message-ID: <2095423248.201132.1730924426363.JavaMail.zimbra@nod.at> (raw)
In-Reply-To: <20241011125904.2915983-2-rickard.andersson@axis.com>

Rickard,

----- Ursprüngliche Mail -----
> Von: "Rickard X Andersson" <rickard.andersson@axis.com>
> An: "richard" <richard@nod.at>, "chengzhihao1" <chengzhihao1@huawei.com>, "linux-mtd" <linux-mtd@lists.infradead.org>,
> "rickard314 andersson" <rickard314.andersson@gmail.com>
> CC: "Rickard X Andersson" <rickard.andersson@axis.com>, "kernel" <kernel@axis.com>
> Gesendet: Freitag, 11. Oktober 2024 14:58:56
> Betreff: [PATCH v3 02/10] ubi: Expose mean erase counter for fastmap in sysfs

> Since the fastmap area has its own wear levelling it is valuable to
> provide a mean value for that area. This value can be used in order
> to estimate life expectancy of the flash.
> 
> Reviewed-by: Zhihao Cheng <chengzhihao1@huawei.com>
> Signed-off-by: Rickard Andersson <rickard.andersson@axis.com>
> ---
> drivers/mtd/ubi/build.c | 11 +++++++++++
> 1 file changed, 11 insertions(+)
> 
> diff --git a/drivers/mtd/ubi/build.c b/drivers/mtd/ubi/build.c
> index 231ca288f397..1c531d623a62 100644
> --- a/drivers/mtd/ubi/build.c
> +++ b/drivers/mtd/ubi/build.c
> @@ -133,6 +133,10 @@ static struct device_attribute dev_max_ec =
> 	__ATTR(max_ec, S_IRUGO, dev_attribute_show, NULL);
> static struct device_attribute dev_mean_ec =
> 	__ATTR(mean_ec, S_IRUGO, dev_attribute_show, NULL);
> +#ifdef CONFIG_MTD_UBI_FASTMAP
> +static struct device_attribute dev_mean_ec_fastmap =
> +	__ATTR(mean_ec_fastmap, S_IRUGO, dev_attribute_show, NULL);
> +#endif

Do you really need distinct sysfs attributes for the fastmap and the
non-fastmap case? Userspace does not care whether fastmap is used or
not, all userspace is interested in is the mean erase counter value.

IMHO, the mean_ec attribute should combine the mean EC values from
the fastmap and the data area.

Thanks,
//richard

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

  reply	other threads:[~2024-11-06 20:20 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-10-11 12:58 [PATCH v3 01/10] ubi: Expose mean erase counter in sysfs Rickard Andersson
2024-10-11 12:58 ` [PATCH v3 02/10] ubi: Expose mean erase counter for fastmap " Rickard Andersson
2024-11-06 20:20   ` Richard Weinberger [this message]
2024-11-07 10:28     ` Rickard x Andersson
2024-11-07 11:31       ` Richard Weinberger
2024-11-07 12:12         ` Rickard x Andersson
2024-10-11 12:58 ` [PATCH v3 03/10] ubi: Expose max " Rickard Andersson
2024-10-11 12:58 ` [PATCH v3 04/10] ubi: Expose mean erase counter for data " Rickard Andersson
2024-10-11 12:58 ` [PATCH v3 05/10] ubi: Expose max " Rickard Andersson
2024-10-11 12:59 ` [PATCH v3 06/10] ubi: Add mean erase counter sysfs attribute Rickard Andersson
2024-10-11 12:59 ` [PATCH v3 07/10] ubi: Add mean erase counter sysfs attribute for fastmap area Rickard Andersson
2024-10-11 12:59 ` [PATCH v3 08/10] ubi: Add max " Rickard Andersson
2024-10-11 12:59 ` [PATCH v3 09/10] ubi: Add mean erase counter sysfs attribute for data area Rickard Andersson
2024-10-11 12:59 ` [PATCH v3 10/10] ubi: Add max " Rickard Andersson
2024-11-06 20:34 ` [PATCH v3 01/10] ubi: Expose mean erase counter in sysfs Richard Weinberger
2024-11-07  1:39   ` Zhihao Cheng
2024-11-14 18:50     ` Richard Weinberger
2024-11-15  9:00       ` Rickard x Andersson
2024-11-16  2:55         ` Zhihao Cheng
2024-11-18 17:00           ` Rickard X Andersson

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=2095423248.201132.1730924426363.JavaMail.zimbra@nod.at \
    --to=richard@nod.at \
    --cc=chengzhihao1@huawei.com \
    --cc=kernel@axis.com \
    --cc=linux-mtd@lists.infradead.org \
    --cc=rickard.andersson@axis.com \
    --cc=rickard314.andersson@gmail.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