changeset 3fd483cdd458 in /z/repo/gem5
details: http://repo.gem5.org/gem5?cmd=changeset;node=3fd483cdd458
description:
mem: Fix WriteLineReq fill behaviour
This patch fixes issues in the interactions between deferred snoops
and WriteLineReq. More specifically, the patch addresses an issue
where deferred snoops caused assertion failures when being serviced on
the arrival of an InvalidateResp. The response packet was perceived to
be invalidating, when actually it is not for the cache that sent out
the original invalidation request.
diffstat:
src/mem/cache/cache.cc | 11 +++++------
1 files changed, 5 insertions(+), 6 deletions(-)
diffs (49 lines):
diff -r 9d09dab39689 -r 3fd483cdd458 src/mem/cache/cache.cc
--- a/src/mem/cache/cache.cc Fri Sep 25 07:26:57 2015 -0400
+++ b/src/mem/cache/cache.cc Fri Sep 25 07:26:58 2015 -0400
@@ -1228,7 +1228,7 @@
// allow invalidation responses originating from write-line
// requests to be discarded
- bool discard_invalidate = false;
+ bool is_invalidate = pkt->isInvalidate();
// First offset for critical word first calculations
int initial_offset = initial_tgt->pkt->getOffset(blkSize);
@@ -1271,7 +1271,7 @@
// treat as a fill, and discard the invalidation
// response
is_fill = true;
- discard_invalidate = true;
+ is_invalidate = false;
}
if (is_fill) {
@@ -1327,7 +1327,7 @@
if (is_error)
tgt_pkt->copyError(pkt);
if (tgt_pkt->cmd == MemCmd::ReadResp &&
- (pkt->isInvalidate() || mshr->hasPostInvalidate())) {
+ (is_invalidate || mshr->hasPostInvalidate())) {
// If intermediate cache got ReadRespWithInvalidate,
// propagate that. Response should not have
// isInvalidate() set otherwise.
@@ -1353,7 +1353,7 @@
assert(!is_error);
// response to snoop request
DPRINTF(Cache, "processing deferred snoop...\n");
- assert(!(pkt->isInvalidate() && !mshr->hasPostInvalidate()));
+ assert(!(is_invalidate && !mshr->hasPostInvalidate()));
handleSnoop(tgt_pkt, blk, true, true, mshr->hasPostInvalidate());
break;
@@ -1368,8 +1368,7 @@
// an invalidate response stemming from a write line request
// should not invalidate the block, so check if the
// invalidation should be discarded
- if ((pkt->isInvalidate() || mshr->hasPostInvalidate()) &&
- !discard_invalidate) {
+ if (is_invalidate || mshr->hasPostInvalidate()) {
assert(blk != tempBlock);
tags->invalidate(blk);
blk->invalidate();
_______________________________________________
gem5-dev mailing list
[email protected]
http://m5sim.org/mailman/listinfo/gem5-dev