summaryrefslogtreecommitdiff
path: root/src/mem/cache/prefetch/queued.hh
diff options
context:
space:
mode:
Diffstat (limited to 'src/mem/cache/prefetch/queued.hh')
-rw-r--r--src/mem/cache/prefetch/queued.hh13
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);
};