mem: fix prefetcher bug regarding write buffer hits
Review Request #2636 - Created Feb. 5, 2015 and discarded
| Information | |
|---|---|
| Steve Reinhardt | |
| gem5 | |
| default | |
| Reviewers | |
| Default | |
Changeset 10683:3147f3a868f7 --------------------------- mem: fix prefetcher bug regarding write buffer hits Prefetches are supposed to be squashed if the block is already present in a higher-level cache. We squash appropriately if the block is in a higher-level cache or MSHR, but did not properly handle the case where the block is in the write buffer. Thanks to George Michelogiannakis <mihelog@lbl.gov> for help in tracking down and testing this fix.
Posted (Feb. 6, 2015, 12:18 a.m.)
It think there are more (and bigger issues) at play here. I'd suggest to try this out with: http://reviews.gem5.org/r/2626/ If you run it with "-p", prefetches enabled, it doesn't take many seconds before it hits an assert. We're working on fixing it, and #2626 is a step on the way.
Posted (Feb. 10, 2015, 9:37 a.m.)
I have had a similar impulse, when inspecting this code. However, the prefetch hitting a write-back in an upper cache is actually already handled in Cache<TagStore>::getTimingPacket():
// Check if the prefetch hit a writeback in an upper cache
// and if so we will eventually get a HardPFResp from
// above
if (snoop_pkt.memInhibitAsserted()) {
// If we are getting a non-shared response it is dirty
bool pending_dirty_resp = !snoop_pkt.sharedAsserted();
markInService(mshr, pending_dirty_resp);
DPRINTF(Cache, "Upward snoop of prefetch for addr"
" %#x (%s) hit\n",
tgt_pkt->getAddr(), tgt_pkt->isSecure()? "s": "ns");
return NULL;
}
We are currently testing a patch that shuffles this thing upwards; we have more detail tomorrow. In either way, if we want to go with this patch, it should address this seemingly dead bit of logic, as well. My suggestion is to give this an additional day, and in the meantime test as Andreas has suggested.
