From efc9a68620d6eaa77d85816159a2fcbcc3d97781 Mon Sep 17 00:00:00 2001 From: Arthur Perais Date: Mon, 31 May 2021 17:20:04 +0200 Subject: [PATCH] mem: Fix Best Offset Prefetcher (BOP) learning phase code. According to the DPC paper : "If the best score is less than or equal to a fixed value BADSCORE, we turn prefetchoff during the next phase" However, the current code will turn prefetch off if the best *offset* of the learning phase is less than BADSCORE, which is incorrect. Change-Id: Ib5790fe1341f2dd6328ec3b018bc52012e376723 Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/46259 Reviewed-by: Nathanael Premillieu Reviewed-by: Daniel Carvalho Maintainer: Jason Lowe-Power Tested-by: kokoro --- src/mem/cache/prefetch/bop.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/mem/cache/prefetch/bop.cc b/src/mem/cache/prefetch/bop.cc index 255b2f8cdd..9a4afd297d 100644 --- a/src/mem/cache/prefetch/bop.cc +++ b/src/mem/cache/prefetch/bop.cc @@ -217,7 +217,7 @@ BOP::bestOffsetLearning(Addr x) phaseBestOffset = 0; resetScores(); issuePrefetchRequests = true; - } else if (phaseBestOffset <= badScore) { + } else if (bestScore <= badScore) { issuePrefetchRequests = false; } }