mem: Hide WriteInvalidate requests from prefetchers
Without this tweak, a prefetcher will happily prefetch data that will promptly be invalidated and overwritten by a WriteInvalidate.
This commit is contained in:
parent
bd4f901c77
commit
516e6046ae
1 changed files with 3 additions and 1 deletions
4
src/mem/cache/prefetch/base.cc
vendored
4
src/mem/cache/prefetch/base.cc
vendored
|
@ -83,7 +83,8 @@ BasePrefetcher::observeAccess(const PacketPtr &pkt) const
|
|||
{
|
||||
Addr addr = pkt->getAddr();
|
||||
bool fetch = pkt->req->isInstFetch();
|
||||
bool read= pkt->isRead();
|
||||
bool read = pkt->isRead();
|
||||
bool inv = pkt->isInvalidate();
|
||||
bool is_secure = pkt->isSecure();
|
||||
|
||||
if (pkt->req->isUncacheable()) return false;
|
||||
|
@ -91,6 +92,7 @@ BasePrefetcher::observeAccess(const PacketPtr &pkt) const
|
|||
if (!fetch && !onData) return false;
|
||||
if (!fetch && read && !onRead) return false;
|
||||
if (!fetch && !read && !onWrite) return false;
|
||||
if (!fetch && !read && inv) return false;
|
||||
|
||||
if (onMiss) {
|
||||
return !inCache(addr, is_secure) &&
|
||||
|
|
Loading…
Reference in a new issue