summaryrefslogtreecommitdiff
path: root/src/mem/coherent_xbar.cc
diff options
context:
space:
mode:
authorAli Jafri <ali.jafri@arm.com>2015-09-25 07:26:57 -0400
committerAli Jafri <ali.jafri@arm.com>2015-09-25 07:26:57 -0400
commit6ac356f93b897c8a80378f114865240cba96b693 (patch)
tree8207ecd8c01334562136285be7d64ab7ef9455f6 /src/mem/coherent_xbar.cc
parent79d3dbcea82cf2197920981999ad458ed3a34690 (diff)
downloadgem5-6ac356f93b897c8a80378f114865240cba96b693.tar.xz
mem: Add CleanEvict and Writeback support to snoop filters
This patch adds the functionality to properly track CleanEvicts and Writebacks in the snoop filter. Previously there were no CleanEvicts, and Writebacks did not send up snoops to ensure there were no copies in caches above. Hence a writeback could never erase an entry from the snoop filter. When a CleanEvict message reaches a snoop filter, it confirms that the BLOCK_CACHED flag is not set and resets the bits corresponding to the CleanEvict address and port it arrived on. If none of the other peer caches have (or have requested) the block, the snoop filter forwards the CleanEvict to lower levels of memory. In case of a Writeback message, the snoop filter checks if the BLOCK_CACHED flag is not set and only then resets the bits corresponding to the Writeback address. If any of the other peer caches have (or has requested) the same block, the snoop filter sets the BLOCK_CACHED flag in the Writeback before forwarding it to lower levels of memory heirarachy.
Diffstat (limited to 'src/mem/coherent_xbar.cc')
-rw-r--r--src/mem/coherent_xbar.cc12
1 files changed, 0 insertions, 12 deletions
diff --git a/src/mem/coherent_xbar.cc b/src/mem/coherent_xbar.cc
index 32ca6d02d..b07356ede 100644
--- a/src/mem/coherent_xbar.cc
+++ b/src/mem/coherent_xbar.cc
@@ -230,24 +230,12 @@ CoherentXBar::recvTimingReq(PacketPtr pkt, PortID slave_port_id)
const bool expect_response = pkt->needsResponse() &&
!pkt->memInhibitAsserted();
- // Note: Cannot create a copy of the full packet, here.
- MemCmd orig_cmd(pkt->cmd);
-
// since it is a normal request, attempt to send the packet
bool success = masterPorts[master_port_id]->sendTimingReq(pkt);
if (snoopFilter && !system->bypassCaches()) {
- // The packet may already be overwritten by the sendTimingReq function.
- // The snoop filter needs to see the original request *and* the return
- // status of the send operation, so we need to recreate the original
- // request. Atomic mode does not have the issue, as there the send
- // operation and the response happen instantaneously and don't need two
- // phase tracking.
- MemCmd tmp_cmd(pkt->cmd);
- pkt->cmd = orig_cmd;
// Let the snoop filter know about the success of the send operation
snoopFilter->updateRequest(pkt, *src_port, !success);
- pkt->cmd = tmp_cmd;
}
// check if we were successful in sending the packet onwards