[Bug debuginfod/29098] set default prefetch limits to >0
Frank Ch. Eigler
fche@redhat.com
Mon May 9 18:35:20 GMT 2022
Hi -
> + // Make the prefetch cache spaces smaller than the normal
> + // fd cache if rpm scanning is on. This is to not waste memory
> + // since the prefetch cache isn't used when -R isn't specified
> + // Set to 1/2 arbitrarily
> + if ( scan_archives[".rpm"] == "cat" )
> + {
> + if ( fdcache_prefetch_fds == 0 )
> + fdcache_prefetch_fds = fdcache_fds * .5;
> + if ( fdcache_prefetch_mbs == 0 )
> + fdcache_prefetch_mbs = fdcache_mbs * .5;
> + }
Yeah, something like that. It turns out that space for the prefetch
cache is not used at all if RPM (and don't forget about other archive
types!) is not in effect. So it's harmless to set those defaults
unconditionally. How about a simpler:
if ( fdcache_prefetch_fds == 0 )
fdcache_prefetch_fds = fdcache_fds * .5;
if ( fdcache_prefetch_mbs == 0 )
fdcache_prefetch_mbs = fdcache_mbs * .5;
- FChE
More information about the Elfutils-devel
mailing list