[RFC] UBI statistics and bitrot interface

Richard Weinberger richard at nod.at
Wed Feb 12 13:58:43 PST 2025


Ashley,

----- Ursprüngliche Mail -----
> Von: "Ashley Herron" <herroash at amazon.com>
>> This series adds new ioctl()s to UBI such that userspace can query
>> read/erase counters and trigger re-reads/scrubbing of PEBs.
>> Especially for MLC NAND flash where read disturb and data retention
>> is a big topic this interface can be used by applications to foster the NAND.
>> Parallel to this series at patch series against mtd-utils is sent that
>> implements a ubihealthd which makes use of that interface.
> 
> 
>> [PATCH 1/5] UBI: Introduce prepare_erase_work()
>> [PATCH 2/5] UBI: Introduce in_pq()
> Equivalent changes present, can be dropped.
>> [PATCH 3/5] UBI: Expose the bitrot interface
> Equivalent changes present, can be dropped.
>> [PATCH 4/5] UBI: Add basic read counter support
>> [PATCH 5/5] UBI: Expose UBI statistics interface
> 
> Hi Richard, I am wanting to add statistic metrics to UBI devices and my
> searching for existing solutions brought me to this stale patch set.
> Is there a reason the patchset went stale other than low priority to get it
> merged and it was forgotten? And would you consider reviving it if you don't
> see any concerns?
> Thanks, Ashley

IIRC, this patches have been part of our failed approach to support MLC
NAND. One part was exposing a more or less sophisticated interface
to userspace such that a NAND flash specific daemon can foster the chip.

After some iterations, ubihealthd was born. But it does not use a statistics
interface.

What kind of metrics are you looking for?
Maybe some eBPF/tracing magic will already serve you enough data points?

Thanks,
//richard



More information about the linux-mtd mailing list