changeset 2e8abe3bbe32 in /z/repo/gem5
details: http://repo.gem5.org/gem5?cmd=changeset;node=2e8abe3bbe32
description:
mem: Pass shared downstream through caches
This patch ensures that we pass on information about a packet being
shared (rather than exclusive), when forwarding a packet downstream.
Without this patch there is a risk that a downstream cache considers
the line exclusive when it really isn't.
diffstat:
src/mem/cache/cache_impl.hh | 12 ++++++++++++
1 files changed, 12 insertions(+), 0 deletions(-)
diffs (22 lines):
diff -r 9077e269ca4a -r 2e8abe3bbe32 src/mem/cache/cache_impl.hh
--- a/src/mem/cache/cache_impl.hh Tue May 05 03:22:25 2015 -0400
+++ b/src/mem/cache/cache_impl.hh Tue May 05 03:22:26 2015 -0400
@@ -819,6 +819,18 @@
}
PacketPtr pkt = new Packet(cpu_pkt->req, cmd, blkSize);
+ // if there are sharers in the upper levels, pass that info downstream
+ if (cpu_pkt->sharedAsserted()) {
+ // note that cpu_pkt may have spent a considerable time in the
+ // MSHR queue and that the information could possibly be out
+ // of date, however, there is no harm in conservatively
+ // assuming the block is shared
+ pkt->assertShared();
+ DPRINTF(Cache, "%s passing shared from %s to %s addr %#llx size %d\n",
+ __func__, cpu_pkt->cmdString(), pkt->cmdString(),
+ pkt->getAddr(), pkt->getSize());
+ }
+
// the packet should be block aligned
assert(pkt->getAddr() == blockAlign(pkt->getAddr()));
_______________________________________________
gem5-dev mailing list
[email protected]
http://m5sim.org/mailman/listinfo/gem5-dev