diff options
author | Nikos Nikoleris <nikos.nikoleris@arm.com> | 2018-03-18 22:07:30 +0000 |
---|---|---|
committer | Nikos Nikoleris <nikos.nikoleris@arm.com> | 2018-06-22 17:39:16 +0000 |
commit | fe330fdd3568beb880465a0ee974c7913d73dfcb (patch) | |
tree | 014244ab7ae7b686709cbe0b078e7198ff4c8fa1 /src/mem/cache/base.cc | |
parent | f4015a2c62e7cd8c169dae801e6d6901f40e1e40 (diff) | |
download | gem5-fe330fdd3568beb880465a0ee974c7913d73dfcb.tar.xz |
mem-cache: Promote deferred targets on cache clean responses
While a cache clean operation is pending, all requests to the
corresponding block get deferred. When the response of a cache clean
operation is received, if the block is present and the response is not
invalidating, we can service all deferred targets that didn't require
writable. This change implements this functionality.
Change-Id: Ief47e74d07749a6a9736ab450eb46eefa53464a2
Reviewed-on: https://gem5-review.googlesource.com/11018
Reviewed-by: Daniel Carvalho <odanrc@yahoo.com.br>
Reviewed-by: Jason Lowe-Power <jason@lowepower.com>
Maintainer: Jason Lowe-Power <jason@lowepower.com>
Diffstat (limited to 'src/mem/cache/base.cc')
-rw-r--r-- | src/mem/cache/base.cc | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/mem/cache/base.cc b/src/mem/cache/base.cc index a510bac8a..8fd9ac298 100644 --- a/src/mem/cache/base.cc +++ b/src/mem/cache/base.cc @@ -491,6 +491,12 @@ BaseCache::recvTimingResp(PacketPtr pkt) // The block was marked not readable while there was a pending // cache maintenance operation, restore its flag. blk->status |= BlkReadable; + + // This was a cache clean operation (without invalidate) + // and we have a copy of the block already. Since there + // is no invalidation, we can promote targets that don't + // require a writable copy + mshr->promoteReadable(); } if (blk && blk->isWritable() && !pkt->req->isCacheInvalidate()) { @@ -887,6 +893,8 @@ BaseCache::satisfyRequest(PacketPtr pkt, CacheBlk *blk, bool, bool) pkt->setCacheResponding(); blk->status &= ~BlkDirty; } + } else if (pkt->isClean()) { + blk->status &= ~BlkDirty; } else { assert(pkt->isInvalidate()); invalidateBlock(blk); |