summaryrefslogtreecommitdiff
path: root/src/mem/cache/cache.cc
diff options
context:
space:
mode:
authorNikos Nikoleris <nikos.nikoleris@arm.com>2018-03-18 22:07:30 +0000
committerNikos Nikoleris <nikos.nikoleris@arm.com>2018-06-22 17:39:16 +0000
commitfe330fdd3568beb880465a0ee974c7913d73dfcb (patch)
tree014244ab7ae7b686709cbe0b078e7198ff4c8fa1 /src/mem/cache/cache.cc
parentf4015a2c62e7cd8c169dae801e6d6901f40e1e40 (diff)
downloadgem5-fe330fdd3568beb880465a0ee974c7913d73dfcb.tar.xz
mem-cache: Promote deferred targets on cache clean responses
While a cache clean operation is pending, all requests to the corresponding block get deferred. When the response of a cache clean operation is received, if the block is present and the response is not invalidating, we can service all deferred targets that didn't require writable. This change implements this functionality. Change-Id: Ief47e74d07749a6a9736ab450eb46eefa53464a2 Reviewed-on: https://gem5-review.googlesource.com/11018 Reviewed-by: Daniel Carvalho <odanrc@yahoo.com.br> Reviewed-by: Jason Lowe-Power <jason@lowepower.com> Maintainer: Jason Lowe-Power <jason@lowepower.com>
Diffstat (limited to 'src/mem/cache/cache.cc')
-rw-r--r--src/mem/cache/cache.cc8
1 files changed, 2 insertions, 6 deletions
diff --git a/src/mem/cache/cache.cc b/src/mem/cache/cache.cc
index ffd60811e..9b1612904 100644
--- a/src/mem/cache/cache.cc
+++ b/src/mem/cache/cache.cc
@@ -674,8 +674,6 @@ Cache::serviceMSHRTargets(MSHR *mshr, const PacketPtr pkt, CacheBlk *blk,
const int initial_offset = initial_tgt->pkt->getOffset(blkSize);
const bool is_error = pkt->isError();
- bool is_fill = !mshr->isForward &&
- (pkt->isRead() || pkt->cmd == MemCmd::UpgradeResp);
// allow invalidation responses originating from write-line
// requests to be discarded
bool is_invalidate = pkt->isInvalidate();
@@ -716,13 +714,11 @@ Cache::serviceMSHRTargets(MSHR *mshr, const PacketPtr pkt, CacheBlk *blk,
targets.allocOnFill);
assert(blk);
- // treat as a fill, and discard the invalidation
- // response
- is_fill = true;
+ // discard the invalidation response
is_invalidate = false;
}
- if (is_fill) {
+ if (blk && blk->isValid() && !mshr->isForward) {
satisfyRequest(tgt_pkt, blk, true, mshr->hasPostDowngrade());
// How many bytes past the first request is this one