From ecf110f3770fb470e81916b72bd5594b7fc993f7 Mon Sep 17 00:00:00 2001 From: Zygo Blaxell Date: Sun, 31 Oct 2021 20:45:24 -0400 Subject: [PATCH] context: add a comment explaining why we are not adding bees_unreadahead At the end of scanning one extent, in theory we do not need that extent any more. In practice, it hurts benchmark scores if we drop the extents after reading them. Add a comment to note this where we put the bees_unreadhead call. Signed-off-by: Zygo Blaxell --- src/bees-context.cc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/bees-context.cc b/src/bees-context.cc index f4b03ae..195afe8 100644 --- a/src/bees-context.cc +++ b/src/bees-context.cc @@ -717,6 +717,8 @@ BeesContext::scan_one_extent(const BeesFileRange &bfr, const Extent &e) BEESLOGINFO("scan: " << pretty(e.size()) << " " << to_hex(e.begin()) << " [" << bar << "] " << to_hex(e.end()) << ' ' << name_fd(bfr.fd())); } + // Costs 10% on benchmarks + // bees_unreadahead(bfr.fd(), bfr.begin(), bfr.size()); return bfr; }