From bb821dfd6ca85709df946f713384d03504066f64 Mon Sep 17 00:00:00 2001 From: Noah Sanci Date: Mon, 9 May 2022 13:15:04 -0400 Subject: [PATCH] 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 --- debuginfod/ChangeLog | 4 ++++ debuginfod/debuginfod.cxx | 7 +++++++ 2 files changed, 11 insertions(+) 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; -- 2.47.3