From: Anis Peysieux Date: Tue, 9 Apr 2019 14:26:53 +0000 (+0200) Subject: mem-cache: Fix RRPV for RRIP X-Git-Tag: v19.0.0.0~970 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=04bc162f152b4a67aad921b4965353cb73cbc820;p=gem5.git 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 Reviewed-by: Nikos Nikoleris Maintainer: Jason Lowe-Power Maintainer: Nikos Nikoleris --- 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;