From 5e91529ad211cd797ae176a3f48b86d87756f39a Mon Sep 17 00:00:00 2001 From: Zygo Blaxell Date: Wed, 11 Jan 2017 20:56:13 -0500 Subject: [PATCH] hash: remove the unused m_prefetch_rate_limit The hash table statistics calculation in BeesHashTable::prefetch_loop and the data-driven operation of the extent scanner always pulls the hash table into RAM as fast as the disk will push the data. We never use the prefetch rate limit, so remove it. Signed-off-by: Zygo Blaxell --- src/bees-hash.cc | 4 ---- src/bees.h | 1 - 2 files changed, 5 deletions(-) diff --git a/src/bees-hash.cc b/src/bees-hash.cc index 4e7917f..1e1a5b2 100644 --- a/src/bees-hash.cc +++ b/src/bees-hash.cc @@ -335,9 +335,6 @@ BeesHashTable::fetch_missing_extent(HashType hash) } BEESCOUNT(hash_extent_in); - // We don't block when fetching an extent but we do slow down the - // prefetch thread. - m_prefetch_rate_limit.borrow(BLOCK_SIZE_HASHTAB_EXTENT); lock.lock(); m_buckets_missing.erase(extent_number); } @@ -596,7 +593,6 @@ BeesHashTable::BeesHashTable(shared_ptr ctx, string filename, off_t m_writeback_thread("hash_writeback"), m_prefetch_thread("hash_prefetch"), m_flush_rate_limit(BEES_FLUSH_RATE), - m_prefetch_rate_limit(BEES_FLUSH_RATE), m_stats_file(m_ctx->home_fd(), "beesstats.txt") { // Sanity checks to protect the implementation from its weaknesses diff --git a/src/bees.h b/src/bees.h index 5aabdd0..d3b674e 100644 --- a/src/bees.h +++ b/src/bees.h @@ -444,7 +444,6 @@ private: BeesThread m_writeback_thread; BeesThread m_prefetch_thread; RateLimiter m_flush_rate_limit; - RateLimiter m_prefetch_rate_limit; mutex m_extent_mutex; mutex m_bucket_mutex; condition_variable m_condvar;