Re: Jffs2 and big file = very slow jffs2_garbage_collect_pass

Jörn Engel
2008-01-18T18:26:52Z

On Fri, 18 January 2008 11:55:31 -0600, Josh Boyer wrote:
>
> That seems consistent with JFFS2 doing the CRC checks and constructing
> the in-memory representation of your large file. I suspect the older
> list-based in-memory implementation would have taken even longer, but
> there could be something amiss with the rb-tree stuff perhaps.

There is something conceptually amiss with rb-trees. Each node
effectively occupies its own cacheline. With those 40k+ nodes, you
would need a rather sizeable cache with at least 20k cachelines to have
an impact. Noone does. So for all practical purposes, every single
lookup will go to main memory.

Maybe it is about time to suggest trying logfs?

Jörn

--
People will accept your ideas much more readily if you tell them
that Benjamin Franklin said it first.
-- unknown