diff options
author | Javier Bueno <javier.bueno@metempsy.com> | 2019-05-16 14:03:41 +0200 |
---|---|---|
committer | Javier Bueno Hedo <javier.bueno@metempsy.com> | 2019-05-29 11:59:20 +0000 |
commit | 5cbd972689d3a8f92518593de26e8d89754e646d (patch) | |
tree | 5792fa1f822512f91cf4c44b44e2f2743204faae /src/mem/cache/prefetch/queued.hh | |
parent | 08c79a194d1a3430801c04f37d13216cc9ec1da3 (diff) | |
download | gem5-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/queued.hh')
-rw-r--r-- | src/mem/cache/prefetch/queued.hh | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/mem/cache/prefetch/queued.hh b/src/mem/cache/prefetch/queued.hh index 1ffbc9a6c..ae4c5e4ad 100644 --- a/src/mem/cache/prefetch/queued.hh +++ b/src/mem/cache/prefetch/queued.hh @@ -163,6 +163,9 @@ class QueuedPrefetcher : public BasePrefetcher /** Tag prefetch with PC of generating access? */ const bool tagPrefetch; + /** Percentage of requests that can be throttled */ + const unsigned int throttleControlPct; + // STATS Stats::Scalar pfIdentified; Stats::Scalar pfBufferHit; @@ -229,6 +232,16 @@ class QueuedPrefetcher : public BasePrefetcher bool alreadyInQueue(std::list<DeferredPacket> &queue, const PrefetchInfo &pfi, int32_t priority); + /** + * Returns the maxmimum number of prefetch requests that are allowed + * to be created from the number of prefetch candidates provided. + * The behavior of this service is controlled with the throttleControlPct + * parameter. + * @param total number of prefetch candidates generated by the prefetcher + * @return the number of these request candidates are allowed to be created + */ + size_t getMaxPermittedPrefetches(size_t total) const; + RequestPtr createPrefetchRequest(Addr addr, PrefetchInfo const &pfi, PacketPtr pkt); }; |