[PATCH][RFC] FDI mmap optimization
David Zeuthen
david at fubar.dk
Thu Dec 14 19:44:32 PST 2006
Sergey Lapin wrote:
> Hi,
> please see attached patch, it frees a few kbs of heap on my setup
> (embedded ARM device) and reduces memory fragmentation.
This is pretty cool; some comments
- Should store the cache file in /var/run/hal/fdi-cache
- How about moving the fdi cache generation into a separate program?
Seems it would reduce fragmentation and the main hald process
wouldn't need to link in expat.
- Would probably be worthwhile to check timestamps on directories
and not regenerate the cache if cache is newer than any of
the directories in the fdi search paths
- Then packagers would just run the fdi-cache-generation in %post
and hald on the installed system would never need to generate
the cache until new stuff is added etc.
- We should probably use inotify (or dnotify on platforms lacking
inotify) to regenerate the cache when fdi files are added / removed /
changed. The git version don't handle this well but 0.5.8.1
and earlier did due to the rather brute-force lack of caching. So
we should probably fix that anyway :-)
> +#ifdef DUMP_RULES
Should probably not have this.
David
More information about the hal
mailing list