mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* State of the UBI fastmap feature
@ 2025-09-02  6:00 Alexander Dahl
  2025-09-02  7:23 ` Richard Weinberger
  0 siblings, 1 reply; 4+ messages in thread
From: Alexander Dahl @ 2025-09-02  6:00 UTC (permalink / raw)
  To: linux-mtd; +Cc: linux-kernel

Hello everyone,

after using UBI for almost 15 years now without fastmap, I'm currently
experimenting with that feature.  The help text in Kconfig menu
(drivers/mtd/ubi/Kconfig) still says "Experimental feature" and
further down:

> Important: this feature is experimental so far and the on-flash
> format for fastmap may change in the next kernel versions

Is this still the current state?  I can not remember seing any patches
touching fastmap in the last time.  Are there plans to stabilize this?
Will there be changes in the on-flash format?  Do folks even use this
feature?  In production?

Happy to get some opinions here.

Greets
Alex


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: State of the UBI fastmap feature
  2025-09-02  6:00 State of the UBI fastmap feature Alexander Dahl
@ 2025-09-02  7:23 ` Richard Weinberger
  2025-09-02  7:37   ` Alexander Dahl
  0 siblings, 1 reply; 4+ messages in thread
From: Richard Weinberger @ 2025-09-02  7:23 UTC (permalink / raw)
  To: linux-mtd, linux-kernel

On Tue, Sep 2, 2025 at 8:00 AM Alexander Dahl <ada@thorsis.com> wrote:
> Hello everyone,
>
> after using UBI for almost 15 years now without fastmap, I'm currently
> experimenting with that feature.  The help text in Kconfig menu
> (drivers/mtd/ubi/Kconfig) still says "Experimental feature" and
> further down:
>
> > Important: this feature is experimental so far and the on-flash
> > format for fastmap may change in the next kernel versions
>
> Is this still the current state?  I can not remember seing any patches
> touching fastmap in the last time.  Are there plans to stabilize this?
> Will there be changes in the on-flash format?  Do folks even use this
> feature?  In production?

I don’t expect changes to the on-disk format, but the number of new raw NAND
devices being introduced is now close to zero. As a result, the user
base is very small,
and subtle bugs are likely to remain undiscovered.

Fastmap does have users, including in production,
but I don’t have concrete numbers. And I don't know their workload.
That said, Fastmap should work but I still anticipate performance and
runtime issues.

I guess your motivation is reducing the attach time?

-- 
Thanks,
//richard

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: State of the UBI fastmap feature
  2025-09-02  7:23 ` Richard Weinberger
@ 2025-09-02  7:37   ` Alexander Dahl
  2025-09-02  7:48     ` Richard Weinberger
  0 siblings, 1 reply; 4+ messages in thread
From: Alexander Dahl @ 2025-09-02  7:37 UTC (permalink / raw)
  To: Richard Weinberger; +Cc: linux-mtd, linux-kernel

Hello Richard,

Am Tue, Sep 02, 2025 at 09:23:04AM +0200 schrieb Richard Weinberger:
> On Tue, Sep 2, 2025 at 8:00 AM Alexander Dahl <ada@thorsis.com> wrote:
> > Hello everyone,
> >
> > after using UBI for almost 15 years now without fastmap, I'm currently
> > experimenting with that feature.  The help text in Kconfig menu
> > (drivers/mtd/ubi/Kconfig) still says "Experimental feature" and
> > further down:
> >
> > > Important: this feature is experimental so far and the on-flash
> > > format for fastmap may change in the next kernel versions
> >
> > Is this still the current state?  I can not remember seing any patches
> > touching fastmap in the last time.  Are there plans to stabilize this?
> > Will there be changes in the on-flash format?  Do folks even use this
> > feature?  In production?
> 
> I don’t expect changes to the on-disk format, but the number of new raw NAND
> devices being introduced is now close to zero. As a result, the user
> base is very small,
> and subtle bugs are likely to remain undiscovered.

We are still using it in cost-sensitive products.  Those raw NAND
flash chips are a lot cheaper than eMMC or even NOR flashs of the same
size.

> Fastmap does have users, including in production,
> but I don’t have concrete numbers. And I don't know their workload.
> That said, Fastmap should work but I still anticipate performance and
> runtime issues.
> 
> I guess your motivation is reducing the attach time?

Indeed.  Need to reduce boot time here, and UBI is attached twice.
Once in U-Boot to read the kernel image and then again in Linux.

Greets
Alex


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: State of the UBI fastmap feature
  2025-09-02  7:37   ` Alexander Dahl
@ 2025-09-02  7:48     ` Richard Weinberger
  0 siblings, 0 replies; 4+ messages in thread
From: Richard Weinberger @ 2025-09-02  7:48 UTC (permalink / raw)
  To: Richard Weinberger, linux-mtd, linux-kernel

On Tue, Sep 2, 2025 at 9:37 AM Alexander Dahl <ada@thorsis.com> wrote:
> > I guess your motivation is reducing the attach time?
>
> Indeed.  Need to reduce boot time here, and UBI is attached twice.
> Once in U-Boot to read the kernel image and then again in Linux.

Some ideas that could significantly improve attach time while being
less invasive than Fastmap:
1. Pass the LEB-PEB mapping from U-Boot to Linux so that scanning
occurs only in U-Boot.
2. Optimize EC/VID header reads:
2.1. If supported by the device, transfer only the actual header size
instead of the entire (sub)page.
2.2. Read headers without ECC (if ECC overhead is measurable). If the
header CRC fails, re-read with ECC.

-- 
Thanks,
//richard

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2025-09-02  7:48 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-09-02  6:00 State of the UBI fastmap feature Alexander Dahl
2025-09-02  7:23 ` Richard Weinberger
2025-09-02  7:37   ` Alexander Dahl
2025-09-02  7:48     ` Richard Weinberger

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®