summaryrefslogtreecommitdiff
path: root/src/mem/cache/prefetch/Prefetcher.py
diff options
context:
space:
mode:
authorJavier Bueno <javier.bueno@metempsy.com>2019-05-16 14:03:41 +0200
committerJavier Bueno Hedo <javier.bueno@metempsy.com>2019-05-29 11:59:20 +0000
commit5cbd972689d3a8f92518593de26e8d89754e646d (patch)
tree5792fa1f822512f91cf4c44b44e2f2743204faae /src/mem/cache/prefetch/Prefetcher.py
parent08c79a194d1a3430801c04f37d13216cc9ec1da3 (diff)
downloadgem5-5cbd972689d3a8f92518593de26e8d89754e646d.tar.xz
mem-cache: Accuracy-based rate control for prefetchers
Added a mechanism to control the number of prefetches generated based in the effectiveness of the prefetches generated so far. Change-Id: I33af82546f74a5b5ab372c28574b76dd9a1bd46a Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/18808 Tested-by: kokoro <noreply+kokoro@google.com> Reviewed-by: Nikos Nikoleris <nikos.nikoleris@arm.com> Reviewed-by: Daniel Carvalho <odanrc@yahoo.com.br> Maintainer: Nikos Nikoleris <nikos.nikoleris@arm.com>
Diffstat (limited to 'src/mem/cache/prefetch/Prefetcher.py')
-rw-r--r--src/mem/cache/prefetch/Prefetcher.py12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/mem/cache/prefetch/Prefetcher.py b/src/mem/cache/prefetch/Prefetcher.py
index bf735264a..c7ddcda1c 100644
--- a/src/mem/cache/prefetch/Prefetcher.py
+++ b/src/mem/cache/prefetch/Prefetcher.py
@@ -129,6 +129,18 @@ class QueuedPrefetcher(BasePrefetcher):
tag_prefetch = Param.Bool(True, "Tag prefetch with PC of generating access")
+ # The throttle_control_percentage controls how many of the candidate
+ # addresses generated by the prefetcher will be finally turned into
+ # prefetch requests
+ # - If set to 100, all candidates can be discarded (one request
+ # will always be allowed to be generated)
+ # - Setting it to 0 will disable the throttle control, so requests are
+ # created for all candidates
+ # - If set to 60, 40% of candidates will generate a request, and the
+ # remaining 60% will be generated depending on the current accuracy
+ throttle_control_percentage = Param.Percent(0, "Percentage of requests \
+ that can be throttled depending on the accuracy of the prefetcher.")
+
class StridePrefetcher(QueuedPrefetcher):
type = 'StridePrefetcher'
cxx_class = 'StridePrefetcher'