diff options
author | Mitch Hayenga <mitch.hayenga@arm.com> | 2014-05-09 18:58:46 -0400 |
---|---|---|
committer | Mitch Hayenga <mitch.hayenga@arm.com> | 2014-05-09 18:58:46 -0400 |
commit | a15b713cba52d9d4d2c1204fef050fb3856ca33e (patch) | |
tree | 4bd5a1e3fda3aa33feb10cc475f8b8554f3d0958 /src/mem/cache/mshr_queue.cc | |
parent | b9e6c260a01bab2b59d6eef4f45a642f57484275 (diff) | |
download | gem5-a15b713cba52d9d4d2c1204fef050fb3856ca33e.tar.xz |
mem: Squash prefetch requests from downstream caches
This patch squashes prefetch requests from downstream caches,
so that they do not steal cachelines away from caches closer
to the cpu. It was originally coded by Mitch Hayenga and
modified by Aasheesh Kolli.
Diffstat (limited to 'src/mem/cache/mshr_queue.cc')
-rw-r--r-- | src/mem/cache/mshr_queue.cc | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/mem/cache/mshr_queue.cc b/src/mem/cache/mshr_queue.cc index 3150b4f5d..7bfbb90f5 100644 --- a/src/mem/cache/mshr_queue.cc +++ b/src/mem/cache/mshr_queue.cc @@ -232,6 +232,22 @@ MSHRQueue::markPending(MSHR *mshr) mshr->readyIter = addToReadyList(mshr); } +bool +MSHRQueue::forceDeallocateTarget(MSHR *mshr) +{ + bool was_full = isFull(); + assert(mshr->hasTargets()); + // Pop the prefetch off of the target list + mshr->popTarget(); + // Delete mshr if no remaining targets + if (!mshr->hasTargets() && !mshr->promoteDeferredTargets()) { + deallocateOne(mshr); + } + + // Notify if MSHR queue no longer full + return was_full && !isFull(); +} + void MSHRQueue::squash(int threadNum) { |