[RFC/PATCH 0/1] ubi: Add ubiblock driver

Ezequiel Garcia elezegarcia at gmail.com
Fri Nov 30 15:43:07 EST 2012


Hi Artem,

Thanks for the taking the time to answer.

On Fri, Nov 30, 2012 at 8:08 AM, Artem Bityutskiy <dedekind1 at gmail.com> wrote:
>
>> I don't know how many ubi volumes a user typically creates, but I
>> expect not to be too many.
>
> I think I saw something like 8-10 in some peoples' reports.
>

Mmm, that's more than I've expected.

[...]
>
>> This cache is 1-LEB bytes, vmalloced at open() and freed at release().
>
> Is it per-block device?

Yes. But notice the vmalloced cache is freed on release().
So, an unused ubiblock won't allocate it.

>Then I am not sure it is a good idea to
> automatically create them for every volume...
>

Given that ubiblock is workqueue based I believe there isn't any
performance penalty in creating many instances.

Regarding memory footprint: we should consider how much
does it cost to create an ubiblock device, plus the underlying
gendisk, request queue, etc.

If people is partitioning its ubi devices in 8-10 volumes,
then I'm not too sure if we want to create a block device
per-volume automatically. Not because of the cache -again, if an
ubiblock is unused it won't allocate any- but because of overall
unnecessary bloatness.

The main idea behind auto-creation is that, IMHO,
ubi ecosystem already has its own rather large set of
userspace tools, I'm against adding yet another one.

I'm gonna keep playing with this and come up with
the long promise numbers.

    Ezequiel



More information about the linux-mtd mailing list