rocksdb/cache
Peter Dillinger c41122b1a0 Even more HyperClockCache refactoring (#11630)
Summary:
... ahead of dynamic variant.

* Introduce an Unref function for a common pattern. Cases that were previously using std::memory_order_acq_rel we doing so because we were saving the pre-updated value in case it might be used. Now we are explicitly throwing away the pre-updated value so do not need the acquire semantic, just release.
* Introduce a reusable EvictionData struct and TrackAndReleaseEvictedEntry() function.
* Based on a linter suggesting, use const Func& parameter type instead of Func for templated callable parameters.

Pull Request resolved: https://github.com/facebook/rocksdb/pull/11630

Test Plan: existing tests, and performance test with release build of cache_bench. Getting 1-2% difference between before & after from run to run, but inconsistent about which one is faster.

Reviewed By: jowlyzhang

Differential Revision: D47657334

Pulled By: pdillinger

fbshipit-source-id: 5cf2377c0d47a39143b04be6735f98c550e8bdc3
2023-07-24 09:36:09 -07:00
..
cache.cc HyperClockCache support for SecondaryCache, with refactoring (#11301) 2023-03-17 20:23:49 -07:00
cache_bench.cc
cache_bench_tool.cc Some small improvements to HyperClockCache (#11601) 2023-07-14 16:19:22 -07:00
cache_entry_roles.cc Major Cache refactoring, CPU efficiency improvement (#10975) 2023-01-11 14:20:40 -08:00
cache_entry_roles.h Major Cache refactoring, CPU efficiency improvement (#10975) 2023-01-11 14:20:40 -08:00
cache_entry_stats.h Simplify tracking entries already in SecondaryCache (#11299) 2023-03-15 17:51:44 -07:00
cache_helpers.cc Major Cache refactoring, CPU efficiency improvement (#10975) 2023-01-11 14:20:40 -08:00
cache_helpers.h Put Cache and CacheWrapper in new public header (#11192) 2023-02-09 12:12:02 -08:00
cache_key.cc Put Cache and CacheWrapper in new public header (#11192) 2023-02-09 12:12:02 -08:00
cache_key.h
cache_reservation_manager.cc Simplify tracking entries already in SecondaryCache (#11299) 2023-03-15 17:51:44 -07:00
cache_reservation_manager.h Major Cache refactoring, CPU efficiency improvement (#10975) 2023-01-11 14:20:40 -08:00
cache_reservation_manager_test.cc Print stack traces on frozen tests in CI (#10828) 2022-10-18 00:35:35 -07:00
cache_test.cc Add hash_seed to Caches (#11391) 2023-05-09 22:24:26 -07:00
charged_cache.cc HyperClockCache support for SecondaryCache, with refactoring (#11301) 2023-03-17 20:23:49 -07:00
charged_cache.h HyperClockCache support for SecondaryCache, with refactoring (#11301) 2023-03-17 20:23:49 -07:00
clock_cache.cc Even more HyperClockCache refactoring (#11630) 2023-07-24 09:36:09 -07:00
clock_cache.h Even more HyperClockCache refactoring (#11630) 2023-07-24 09:36:09 -07:00
compressed_secondary_cache.cc Integrate CacheReservationManager with compressed secondary cache (#11449) 2023-05-30 14:05:48 -07:00
compressed_secondary_cache.h Integrate CacheReservationManager with compressed secondary cache (#11449) 2023-05-30 14:05:48 -07:00
compressed_secondary_cache_test.cc Integrate CacheReservationManager with compressed secondary cache (#11449) 2023-05-30 14:05:48 -07:00
lru_cache.cc Prepare for specialized interface for row cache (#11620) 2023-07-18 19:12:58 -07:00
lru_cache.h Add hash_seed to Caches (#11391) 2023-05-09 22:24:26 -07:00
lru_cache_test.cc Some small improvements to HyperClockCache (#11601) 2023-07-14 16:19:22 -07:00
secondary_cache.cc Simplify tracking entries already in SecondaryCache (#11299) 2023-03-15 17:51:44 -07:00
secondary_cache_adapter.cc Update secondary_cache_adapter.cc (#11566) 2023-06-27 10:42:42 -07:00
secondary_cache_adapter.h Integrate CacheReservationManager with compressed secondary cache (#11449) 2023-05-30 14:05:48 -07:00
sharded_cache.cc Add hash_seed to Caches (#11391) 2023-05-09 22:24:26 -07:00
sharded_cache.h Add hash_seed to Caches (#11391) 2023-05-09 22:24:26 -07:00
typed_cache.h HyperClockCache support for SecondaryCache, with refactoring (#11301) 2023-03-17 20:23:49 -07:00