mirror of https://github.com/facebook/rocksdb.git
57a0e2f304
Summary: This is the initial step in the development of a lock-free clock cache. This PR includes the base hash table design (which we mostly ported over from FastLRUCache) and the clock eviction algorithm. Importantly, it's still _not_ lock-free---all operations use a shard lock. Besides the locking, there are other features left as future work: - Remove keys from the handles. Instead, use 128-bit bijective hashes of them for handle comparisons, probing (we need two 32-bit hashes of the key for double hashing) and sharding (we need one 6-bit hash). - Remove the clock_usage_ field, which is updated on every lookup. Even if it were atomically updated, it could cause memory invalidations across cores. - Middle insertions into the clock list. - A test that exercises the clock eviction policy. - Update the Java API of ClockCache and Java calls to C++. Along the way, we improved the code and comments quality of FastLRUCache. These changes are relatively minor. Pull Request resolved: https://github.com/facebook/rocksdb/pull/10273 Test Plan: ``make -j24 check`` Reviewed By: pdillinger Differential Revision: D37522461 Pulled By: guidotag fbshipit-source-id: 3d70b737dbb70dcf662f00cef8c609750f083943 |
||
---|---|---|
.. | ||
cache.cc | ||
cache_bench.cc | ||
cache_bench_tool.cc | ||
cache_entry_roles.cc | ||
cache_entry_roles.h | ||
cache_entry_stats.h | ||
cache_helpers.h | ||
cache_key.cc | ||
cache_key.h | ||
cache_reservation_manager.cc | ||
cache_reservation_manager.h | ||
cache_reservation_manager_test.cc | ||
cache_test.cc | ||
clock_cache.cc | ||
clock_cache.h | ||
compressed_secondary_cache.cc | ||
compressed_secondary_cache.h | ||
compressed_secondary_cache_test.cc | ||
fast_lru_cache.cc | ||
fast_lru_cache.h | ||
lru_cache.cc | ||
lru_cache.h | ||
lru_cache_test.cc | ||
sharded_cache.cc | ||
sharded_cache.h |