69#ifndef __MEM_CACHE_REPLACEMENT_POLICIES_TREE_PLRU_RP_HH__
70#define __MEM_CACHE_REPLACEMENT_POLICIES_TREE_PLRU_RP_HH__
81struct TreePLRURPParams;
83namespace replacement_policy
146 std::shared_ptr<PLRUTree>
tree;
168 void invalidate(
const std::shared_ptr<ReplacementData>& replacement_data)
177 void touch(
const std::shared_ptr<ReplacementData>& replacement_data)
const
186 void reset(
const std::shared_ptr<ReplacementData>& replacement_data)
const
A replaceable entry is a basic entry in a 2d table-like structure that needs to have replacement func...
A common base class of cache replacement policy objects.
const uint64_t numLeaves
Number of leaves that share a single replacement data.
ReplaceableEntry * getVictim(const ReplacementCandidates &candidates) const override
Find replacement victim using TreePLRU bits.
void invalidate(const std::shared_ptr< ReplacementData > &replacement_data) override
Invalidate replacement data to set it as the next probable victim.
uint64_t count
Count of the number of sharers of a replacement data.
void touch(const std::shared_ptr< ReplacementData > &replacement_data) const override
Touch an entry to update its replacement data.
std::vector< bool > PLRUTree
Instead of implementing the tree itself with pointers, it is implemented as an array of bits.
std::shared_ptr< ReplacementData > instantiateEntry() override
Instantiate a replacement data entry.
PLRUTree * treeInstance
Holds the latest temporary tree instance created by instantiateEntry().
Reference material can be found at the JEDEC website: UFS standard http://www.jedec....
The replacement data needed by replacement policies.
Tree-PLRU-specific implementation of replacement data.
std::shared_ptr< PLRUTree > tree
Shared tree pointer.
const uint64_t index
Theoretical index of this replacement data in the tree.