diff options
author | Noah Sanci <nsanci@redhat.com> | 2022-05-09 13:15:04 -0400 |
---|---|---|
committer | Frank Ch. Eigler <fche@redhat.com> | 2022-05-09 19:30:07 -0400 |
commit | bb821dfd6ca85709df946f713384d03504066f64 (patch) | |
tree | 01093112011a6bc4b149bb2b3c9b0b8580352fde /debuginfod | |
parent | 59158656f3b0b99d8784ddc82c15778813000edc (diff) | |
download | elfutils-bb821dfd6ca85709df946f713384d03504066f64.tar.gz |
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 <nsanci@redhat.com>
foo
Diffstat (limited to 'debuginfod')
-rw-r--r-- | debuginfod/ChangeLog | 4 | ||||
-rw-r--r-- | debuginfod/debuginfod.cxx | 7 |
2 files changed, 11 insertions, 0 deletions
diff --git a/debuginfod/ChangeLog b/debuginfod/ChangeLog index 619ebd8c..026908c8 100644 --- a/debuginfod/ChangeLog +++ b/debuginfod/ChangeLog @@ -1,3 +1,7 @@ +2022-05-09 Noah Sanci <nsanci@redhat.com> + + * debuginfod.cxx (main): Set nonzero defaults for fdcache. + 2022-05-04 Frank Ch. Eigler <fche@redhat.com> Mark Wielaard <mark@klomp.org> diff --git a/debuginfod/debuginfod.cxx b/debuginfod/debuginfod.cxx index 4aaf41c0..fde4e194 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; |