UBIFS: Advice request on how to reduce orph_buf size

Josselin Costanzi josselin.costanzi at mobile-devices.fr
Thu Nov 22 06:24:22 EST 2012


For anyone interested, we chose to limit the number of orphan
depending on orph_buf size so we can tune the number of orphan we can
create depending on our memory constraints. I don't think it's a
change that should be integrated in the mainline but if someone wants
to see the patch, I should be able to provide it.

2012/11/16 Josselin Costanzi <josselin.costanzi at mobile-devices.fr>:
> Hi,
> In order to reduce UBIFS memory consumption when used in RW I'm trying to
> reduce orph_buf size from one LEB to max_write_size. I changed avail_orphs and
> tot_avail_orphs functions to report correct orphan counts but I'm now stuck
> with the consolidate function. I don't see how I could atomically write all my
> orphans in a new LEB with a max_write_size sized orph_buf. One potential
> solution would be to try allocating a LEB sized buffer only when consolidating
> the orphans but this means commit_orphans may now fail due to memory exhaustion.
>
> Have any of you an idea on how to correctly do this? What would be an acceptable
> solution?
>
> Regards,
> Josselin Costanzi
> Embedded Linux System Engineer



-- 
Josselin Costanzi
  Embedded Linux System Engineer



More information about the linux-mtd mailing list