mem-cache: Fix RRPV for RRIP
authorAnis Peysieux <anis.peysieux@inria.fr>
Tue, 9 Apr 2019 14:26:53 +0000 (16:26 +0200)
committerAnis Peysieux <anis.peysieux@gmail.com>
Thu, 11 Apr 2019 15:34:46 +0000 (15:34 +0000)
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>

src/mem/cache/replacement_policies/ReplacementPolicies.py
src/mem/cache/replacement_policies/brrip_rp.hh

index 0bbf1d16bd4d5e88cfcac3807a08b0333ab1b576..f40d1459ba7c8a5dd52f8e73efb5cc26746a6cf3 100644 (file)
@@ -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):
index 9374742c15712effbb9746ab5a5a534a09f6d132..d3746644fe1e78a5a1d11385bee7d4d86dbc972b 100644 (file)
@@ -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;