diff options
author | Anis Peysieux <anis.peysieux@inria.fr> | 2019-04-09 16:26:53 +0200 |
---|---|---|
committer | Anis Peysieux <anis.peysieux@gmail.com> | 2019-04-11 15:34:46 +0000 |
commit | 04bc162f152b4a67aad921b4965353cb73cbc820 (patch) | |
tree | 9784e7db9e584d6d42bab1fe2b6322e544b1ddaf /src | |
parent | 740756e97736ad6b65dcb651c2f1f69cc1282781 (diff) | |
download | gem5-04bc162f152b4a67aad921b4965353cb73cbc820.tar.xz |
mem-cache: Fix RRPV for RRIP
The RRPV values for RRIP and NRU replacment policies.
Long re-rereference interval was used instead of
distant re-rereference interval and vice-versa.
The btp value permit to choose beetwen distant and
long insertion ratio. A btp value of 0 force the
policy to always insert at a distant re-reference
interval and a btp value of 100 force the policy to
always insert at a long (intermediate) re-rereference
interval.
Change-Id: I516098f73942b769dcc31fe0edfe07c3e9c3effd
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/17851
Reviewed-by: Daniel Carvalho <odanrc@yahoo.com.br>
Reviewed-by: Nikos Nikoleris <nikos.nikoleris@arm.com>
Maintainer: Jason Lowe-Power <jason@lowepower.com>
Maintainer: Nikos Nikoleris <nikos.nikoleris@arm.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/mem/cache/replacement_policies/ReplacementPolicies.py | 4 | ||||
-rw-r--r-- | src/mem/cache/replacement_policies/brrip_rp.hh | 4 |
2 files changed, 6 insertions, 2 deletions
diff --git a/src/mem/cache/replacement_policies/ReplacementPolicies.py b/src/mem/cache/replacement_policies/ReplacementPolicies.py index 0bbf1d16b..f40d1459b 100644 --- a/src/mem/cache/replacement_policies/ReplacementPolicies.py +++ b/src/mem/cache/replacement_policies/ReplacementPolicies.py @@ -85,10 +85,10 @@ class BRRIPRP(BaseReplacementPolicy): "Percentage of blocks to be inserted with long RRPV") class RRIPRP(BRRIPRP): - btp = 0 + btp = 100 class NRURP(BRRIPRP): - btp = 0 + btp = 100 max_RRPV = 1 class TreePLRURP(BaseReplacementPolicy): diff --git a/src/mem/cache/replacement_policies/brrip_rp.hh b/src/mem/cache/replacement_policies/brrip_rp.hh index 9374742c1..d3746644f 100644 --- a/src/mem/cache/replacement_policies/brrip_rp.hh +++ b/src/mem/cache/replacement_policies/brrip_rp.hh @@ -66,6 +66,10 @@ class BRRIPRP : public BaseReplacementPolicy { /** * Re-Reference Interval Prediction Value. + * Some values have specific names (according to the paper): + * 0 -> near-immediate re-rereference interval + * max_RRPV-1 -> long re-rereference interval + * max_RRPV -> distant re-rereference interval * A value equal to max_RRPV + 1 indicates an invalid entry. */ int rrpv; |