summaryrefslogtreecommitdiff
path: root/src/mem/cache/base.hh
diff options
context:
space:
mode:
authorDaniel R. Carvalho <odanrc@yahoo.com.br>2019-06-12 17:26:11 +0200
committerDaniel Carvalho <odanrc@yahoo.com.br>2020-01-17 16:31:03 +0000
commit7dce9e3782523e1b1989c50be194385b93603aea (patch)
tree47e9084bf1a6c5b229836a659d4e4a9e9b79956f /src/mem/cache/base.hh
parentc5d87b0693f1f3cab8bf05ba5327986940cedf5b (diff)
downloadgem5-7dce9e3782523e1b1989c50be194385b93603aea.tar.xz
mem-cache: Factor out multiple block eviction
Create a function to try to evict multiple blocks while checking for transient state. Change-Id: I6a879fa5e793cd92c4bdf4a258a133de4c865012 Signed-off-by: Daniel R. Carvalho <odanrc@yahoo.com.br> Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/22607 Tested-by: kokoro <noreply+kokoro@google.com> Reviewed-by: Nikos Nikoleris <nikos.nikoleris@arm.com> Maintainer: Nikos Nikoleris <nikos.nikoleris@arm.com>
Diffstat (limited to 'src/mem/cache/base.hh')
-rw-r--r--src/mem/cache/base.hh12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/mem/cache/base.hh b/src/mem/cache/base.hh
index cd467c8ad..8e5c18c11 100644
--- a/src/mem/cache/base.hh
+++ b/src/mem/cache/base.hh
@@ -710,6 +710,18 @@ class BaseCache : public ClockedObject
void maintainClusivity(bool from_cache, CacheBlk *blk);
/**
+ * Try to evict the given blocks. If any of them is a transient eviction,
+ * that is, the block is present in the MSHR queue all evictions are
+ * cancelled since handling such cases has not been implemented.
+ *
+ * @param evict_blks Blocks marked for eviction.
+ * @param writebacks List for any writebacks that need to be performed.
+ * @return False if any of the evicted blocks is in transient state.
+ */
+ bool handleEvictions(std::vector<CacheBlk*> &evict_blks,
+ PacketList &writebacks);
+
+ /**
* Handle a fill operation caused by a received packet.
*
* Populates a cache block and handles all outstanding requests for the