Prune obsolete raw_node_ref's from RAM

Øyvind Harboe oyvind.harboe at zylin.com
Wed Jul 14 02:26:48 EDT 2004


On Wed, 2004-07-14 at 01:14, David Woodhouse wrote:
> On Tue, 2004-07-13 at 16:18 +0200, Øyvind Harboe wrote:
> > - Is the code correct? 
> 
> It looks OK at first glance but I can't actually tell. List mangling
> code is hard enough to read when it's in the style I understand :)
> 
> I've rewritten it and just posted that version. 

Excellent! I'll make sure to run my tests with your new version.

> > - What performance impact does it have? 
> 
> It'll go walking the lists every time a node is obsoleted. My guess is
> it'll make the performance suck _hard_. But it will get you your memory
> back. I suspect it should be a configuration option -- or maybe we could
> stick the list-walking code into a separate function and call it
> periodically to do the cleanup, rather than doing it every time.

Note that in my case I have the following usage:

- Little RAM(so freeing up is essential)
- Big flash disk(mainly for wear levelling purposes).
- Few and small files
- Lots of deleted nodes
- The application overwrites existing files with regular intervals

In this scenario, the performance should be fine.

In a scneario with:

- lots of files
- lots of ram
- occasional freing up

Performance should suck.

> Could do with seeing some profiling info.

Would all the performance problems go away if the lists were doubly
linked?

-- 
Øyvind Harboe
http://www.zylin.com






More information about the linux-mtd mailing list