From a15b713cba52d9d4d2c1204fef050fb3856ca33e Mon Sep 17 00:00:00 2001 From: Mitch Hayenga Date: Fri, 9 May 2014 18:58:46 -0400 Subject: 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. --- src/mem/cache/mshr_queue.cc | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'src/mem/cache/mshr_queue.cc') 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) { -- cgit v1.2.3