diff options
author | Ali Jafri <ali.jafri@arm.com> | 2015-11-06 03:26:40 -0500 |
---|---|---|
committer | Ali Jafri <ali.jafri@arm.com> | 2015-11-06 03:26:40 -0500 |
commit | f02a9338c1efaf7680f598a57ff6607e9b11120e (patch) | |
tree | dfba1a176dd9216bb2b820497e527fbf4901aff5 | |
parent | c086c20bd2578a4dfd4ef5d158de1eddffb1fc9a (diff) | |
download | gem5-f02a9338c1efaf7680f598a57ff6607e9b11120e.tar.xz |
mem: Avoid unnecessary snoops on writebacks and clean evictions
This patch optimises the handling of writebacks and clean evictions
when using a snoop filter. Instead of snooping into the caches to
determine if the block is cached or not, simply set the status based
on the snoop-filter result.
-rw-r--r-- | src/mem/coherent_xbar.cc | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/src/mem/coherent_xbar.cc b/src/mem/coherent_xbar.cc index 223ab6ab5..8407f5350 100644 --- a/src/mem/coherent_xbar.cc +++ b/src/mem/coherent_xbar.cc @@ -198,7 +198,18 @@ CoherentXBar::recvTimingReq(PacketPtr pkt, PortID slave_port_id) " SF size: %i lat: %i\n", src_port->name(), pkt->cmdString(), pkt->getAddr(), sf_res.first.size(), sf_res.second); - forwardTiming(pkt, slave_port_id, sf_res.first); + + if (pkt->evictingBlock()) { + // for block-evicting packets, i.e. writebacks and + // clean evictions, there is no need to snoop up, as + // all we do is determine if the block is cached or + // not, instead just set it here based on the snoop + // filter result + if (!sf_res.first.empty()) + pkt->setBlockCached(); + } else { + forwardTiming(pkt, slave_port_id, sf_res.first); + } } else { forwardTiming(pkt, slave_port_id); } |