From: Noah Sanci Date: Mon, 9 May 2022 17:15:04 +0000 (-0400) Subject: PR29098: debuginfod - set default prefetch cache size to >0 X-Git-Tag: elfutils-0.188~80 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=bb821dfd6ca85709df946f713384d03504066f64;p=thirdparty%2Felfutils.git PR29098: debuginfod - set default prefetch cache size to >0 Added default value to fdcache_prefetch_mds and fdcache_prefetch_fds. Defaults to one half of corresponging fdcache's values. Signed-off-by: Noah Sanci foo --- diff --git a/debuginfod/ChangeLog b/debuginfod/ChangeLog index 619ebd8c9..026908c85 100644 --- a/debuginfod/ChangeLog +++ b/debuginfod/ChangeLog @@ -1,3 +1,7 @@ +2022-05-09 Noah Sanci + + * debuginfod.cxx (main): Set nonzero defaults for fdcache. + 2022-05-04 Frank Ch. Eigler Mark Wielaard diff --git a/debuginfod/debuginfod.cxx b/debuginfod/debuginfod.cxx index 4aaf41c08..fde4e194b 100644 --- a/debuginfod/debuginfod.cxx +++ b/debuginfod/debuginfod.cxx @@ -3826,6 +3826,13 @@ main (int argc, char *argv[]) error (EXIT_FAILURE, 0, "unexpected argument: %s", argv[remaining]); + // Make the prefetch cache spaces a fraction of the main fdcache if + // unspecified. + if (fdcache_prefetch_fds == 0) + fdcache_prefetch_fds = fdcache_fds / 2; + if (fdcache_prefetch_mbs == 0) + fdcache_prefetch_mbs = fdcache_mbs / 2; + if (scan_archives.size()==0 && !scan_files && source_paths.size()>0) obatched(clog) << "warning: without -F -R -U -Z, ignoring PATHs" << endl;