Nikos Nikoleris has uploaded this change for review. (
https://gem5-review.googlesource.com/11015
Change subject: mem-cache: Selectively clear downstream pending
......................................................................
mem-cache: Selectively clear downstream pending
Until now, all deferred targets of an MSHR would be promoted together
as soon as the targets were serviced. When we promote deferred targets
we also clear the downstreamPending flag.
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. To allow for partial target promotion, this
change adds support for clearing the downstreamPending only for a
subset of a TargetsList.
Change-Id: Id06953643ba9a975ebacc76ac10215441e264e74
---
M src/mem/cache/mshr.cc
M src/mem/cache/mshr.hh
2 files changed, 13 insertions(+), 5 deletions(-)
diff --git a/src/mem/cache/mshr.cc b/src/mem/cache/mshr.cc
index dc49079..5f6b8b0 100644
--- a/src/mem/cache/mshr.cc
+++ b/src/mem/cache/mshr.cc
@@ -179,25 +179,32 @@
void
-MSHR::TargetList::clearDownstreamPending()
+MSHR::TargetList::clearDownstreamPending(MSHR::TargetList::iterator begin,
+ MSHR::TargetList::iterator end)
{
- for (auto& t : *this) {
- if (t.markedPending) {
+ for (auto t = begin; t != end; t++) {
+ if (t->markedPending) {
// Iterate over the SenderState stack and see if we find
// an MSHR entry. If we find one, clear the
// downstreamPending flag by calling
// clearDownstreamPending(). This recursively clears the
// downstreamPending flag in all caches this packet has
// passed through.
- MSHR *mshr = t.pkt->findNextSenderState<MSHR>();
+ MSHR *mshr = t->pkt->findNextSenderState<MSHR>();
if (mshr != nullptr) {
mshr->clearDownstreamPending();
}
- t.markedPending = false;
+ t->markedPending = false;
}
}
}
+void
+MSHR::TargetList::clearDownstreamPending()
+{
+ clearDownstreamPending(begin(), end());
+}
+
bool
MSHR::TargetList::checkFunctional(PacketPtr pkt)
diff --git a/src/mem/cache/mshr.hh b/src/mem/cache/mshr.hh
index 5c5a9e8..f93d3c0 100644
--- a/src/mem/cache/mshr.hh
+++ b/src/mem/cache/mshr.hh
@@ -234,6 +234,7 @@
void replaceUpgrades();
void clearDownstreamPending();
+ void clearDownstreamPending(iterator begin, iterator end);
bool checkFunctional(PacketPtr pkt);
void print(std::ostream &os, int verbosity,
const std::string &prefix) const;
--
To view, visit https://gem5-review.googlesource.com/11015
To unsubscribe, or for help writing mail filters, visit
https://gem5-review.googlesource.com/settings
Gerrit-Project: public/gem5
Gerrit-Branch: master
Gerrit-Change-Id: Id06953643ba9a975ebacc76ac10215441e264e74
Gerrit-Change-Number: 11015
Gerrit-PatchSet: 1
Gerrit-Owner: Nikos Nikoleris <[email protected]>
Gerrit-MessageType: newchange
_______________________________________________
gem5-dev mailing list
[email protected]
http://m5sim.org/mailman/listinfo/gem5-dev