summaryrefslogtreecommitdiff
path: root/src/mem/cache/mshr.hh
diff options
context:
space:
mode:
authorNikos Nikoleris <nikos.nikoleris@arm.com>2018-03-17 01:50:57 +0000
committerNikos Nikoleris <nikos.nikoleris@arm.com>2018-06-22 17:39:16 +0000
commitf4015a2c62e7cd8c169dae801e6d6901f40e1e40 (patch)
tree99f6ff952cdd82565d19a84c400c47dbcfa9161e /src/mem/cache/mshr.hh
parente656eeb288f8de94cc293012ba74c9c05fd75da3 (diff)
downloadgem5-f4015a2c62e7cd8c169dae801e6d6901f40e1e40.tar.xz
mem-cache: Promote targets that don't require writable
Until now, all deferred targets of an MSHR would be promoted together as soon as the targets were serviced. Due to the way we handle cache clean operations we might need to promote only deferred targets that don't require writable, leaving some targets as deferred. This change adds support for this selective promotion. Change-Id: I502e523dc9adbaf394955cbacea8286ab6a9b6bc Reviewed-on: https://gem5-review.googlesource.com/11017 Reviewed-by: Jason Lowe-Power <jason@lowepower.com> Maintainer: Jason Lowe-Power <jason@lowepower.com>
Diffstat (limited to 'src/mem/cache/mshr.hh')
-rw-r--r--src/mem/cache/mshr.hh20
1 files changed, 20 insertions, 0 deletions
diff --git a/src/mem/cache/mshr.hh b/src/mem/cache/mshr.hh
index 71c2da2c4..050dbd1bf 100644
--- a/src/mem/cache/mshr.hh
+++ b/src/mem/cache/mshr.hh
@@ -286,6 +286,16 @@ class MSHR : public QueueEntry, public Printable
}
private:
+ /**
+ * Promotes deferred targets that satisfy a predicate
+ *
+ * Deferred targets are promoted to the target list if they
+ * satisfy a given condition. The operation stops at the first
+ * deferred target that doesn't satisfy the condition.
+ *
+ * @param pred A condition on a Target
+ */
+ void promoteIf(const std::function<bool (Target &)>& pred);
/**
* Pointer to this MSHR on the ready list.
@@ -388,6 +398,16 @@ class MSHR : public QueueEntry, public Printable
/**
* Promotes deferred targets that do not require writable
*
+ * Move targets from the deferred targets list to the target list
+ * starting from the first deferred target until the first target
+ * that is a cache maintenance operation or needs a writable copy
+ * of the block
+ */
+ void promoteReadable();
+
+ /**
+ * Promotes deferred targets that do not require writable
+ *
* Requests in the deferred target list are moved to the target
* list up until the first target that is a cache maintenance
* operation or needs a writable copy of the block