public inbox for linux-mtd@lists.infradead.org
 help / color / mirror / Atom feed
From: Richard Weinberger <richard@nod.at>
To: chengzhihao1 <chengzhihao1@huawei.com>
Cc: Rickard x Andersson <rickaran@axis.com>,
	 linux-mtd <linux-mtd@lists.infradead.org>,
	 rickard314 andersson <rickard314.andersson@gmail.com>
Subject: Re: Lots of fastmap writes
Date: Tue, 4 Jun 2024 08:47:02 +0200 (CEST)	[thread overview]
Message-ID: <1076184265.187322.1717483622377.JavaMail.zimbra@nod.at> (raw)
In-Reply-To: <95a9872f-77b2-e9a0-f5dc-a376964bc93e@huawei.com>

----- Ursprüngliche Mail -----
> Von: "chengzhihao1" <chengzhihao1@huawei.com>
> An: "Rickard x Andersson" <rickaran@axis.com>, "richard" <richard@nod.at>, "linux-mtd" <linux-mtd@lists.infradead.org>
> CC: "rickard314 andersson" <rickard314.andersson@gmail.com>
> Gesendet: Dienstag, 4. Juni 2024 03:41:21
> Betreff: Re: Lots of fastmap writes

> 在 2024/6/3 16:55, Rickard x Andersson 写道:
>> Hi,
>> 
>> I have a system running Linux 5.10 which logs quite a lot to a database.
>> The system has been running OK since before Christmas but now it usually
>> fails after a few hours with errors like these:
>> 
>> May  6 22:29:58 172.26.203.90   warning ubi2 warning: ubi_io_read: error
>> -74 (ECC error) while reading 58 bytes from PEB 1:230872, read only 58
>> bytes, retry
>> May  7 00:11:08 172.26.203.90   warning ubi2 warning: ubi_io_read: error
>> -74 (ECC error) while reading 58 bytes from PEB 40:239752, read only 58
>> bytes, retry
>> May  7 00:11:08 172.26.203.90   err     ubi2 error: ubi_io_read: error
>> -74 (ECC error) while reading 58 bytes from PEB 40:239752, read 58 bytes
>> 
>> Fastmap is used on this system. The ECC errors are usually in the
>> fastmap area, erase blocks 0- 63.
>> 
>> When looking more closely at the erase counters they look something like
>> this:
>> 
>> 0 - 63: 29600
>> 64 - 2043: 2200

Are all of the first 64 LEBs worn out that badly or just one?
 
> Try this series of patches
> https://lore.kernel.org/linux-mtd/20230812080005.3162125-2-chengzhihao1@huawei.com/T/
>> 
>> It seems like 30 % of the writes are writes to the fastmap area. Any
>> ideas of what can cause this many writes to the fastmap area? Heavy load?
>> 
>> Any ideas are welcome.
>> 
>> nand: device found, Manufacturer ID: 0x98, Chip ID: 0xdc
>> nand: Toshiba TC58NVG2S0H 4G 3.3V 8-bit
>> nand: 512 MiB, SLC, erase size: 256 KiB, page size: 4096, OOB size: 256
>> nand: 2 chips detected
>> 
>> UBIFS (ubi2:0): Mounting in authenticated mode
>> UBIFS (ubi2:0): background thread "ubifs_bgt2_0" started, PID 187
>> UBIFS (ubi2:0): UBIFS: mounted UBI device 2, volume 0, name "data_volume"
>> UBIFS (ubi2:0): LEB size: 253952 bytes (248 KiB), min./max. I/O unit
>> sizes: 4096 bytes/4096 bytes
>> UBIFS (ubi2:0): FS size: 505110528 bytes (481 MiB, 1989 LEBs), journal
>> size 25395200 bytes (24 MiB, 100 LEBs)
>> UBIFS (ubi2:0): reserved for root: 4676575 bytes (4566 KiB)
>> UBIFS (ubi2:0): media format: w5/r0 (latest is w5/r0), UUID
>> 990A460D-A55E-4B58-ACAD-01FEBC7AF839, small LPT model
>> 
>> ubi2: default fastmap pool size: 100
>> ubi2: default fastmap WL pool size: 50
>> ubi2: attaching mtd5
>> ubi2: attached by fastmap
>> ubi2: fastmap pool size: 100
>> ubi2: fastmap WL pool size: 50

As Zhihao Cheng said, his patch series might help.
Making the fastmap pools larger is also an option.
With larger pools, fastmap needs write less often, but scan
more at attach time.

Thanks,
//richard

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

  parent reply	other threads:[~2024-06-04  6:47 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-06-03  8:55 Lots of fastmap writes Rickard x Andersson
2024-06-04  1:41 ` Zhihao Cheng
2024-06-04  1:52   ` Zhihao Cheng
2024-06-14 11:42     ` Rickard X Andersson
2024-06-14 12:28       ` Zhihao Cheng
2024-06-17 11:20         ` Rickard x Andersson
2024-06-17 13:21           ` Zhihao Cheng
2024-06-17 13:48             ` Rickard x Andersson
2024-06-17 13:55               ` Zhihao Cheng
2024-06-04  6:47   ` Richard Weinberger [this message]
2024-06-14 11:45     ` 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=1076184265.187322.1717483622377.JavaMail.zimbra@nod.at \
    --to=richard@nod.at \
    --cc=chengzhihao1@huawei.com \
    --cc=linux-mtd@lists.infradead.org \
    --cc=rickaran@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