[PATCH][RFC] FDI mmap optimization
Sergey Lapin
slapinid at gmail.com
Thu Dec 14 20:50:20 PST 2006
David Zeuthen wrote:
> 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
Agree
>
> - 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.
Cool! Will implement that this weekend...
>
> - 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
Yeah, that'd be great!
>
> - 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.
Seems reasonable to me
>
> - 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.
That is good for debugging - I'd better leave that ifdefed-out than
commented. Commented-out code is bad, IMHO.
Probably worth some configure rule though...
S.
More information about the hal
mailing list