mem: Update mostly exclusive policy even further
authorAndreas Hansson <andreas.hansson@arm.com>
Fri, 12 Aug 2016 13:11:45 +0000 (14:11 +0100)
committerAndreas Hansson <andreas.hansson@arm.com>
Fri, 12 Aug 2016 13:11:45 +0000 (14:11 +0100)
commit721efa4d094197404a0df0d2bae6c27b4402c0ef
treec5ac607300a8929cfda18f94a2bd1f00599098be
parent94f94fbc555356d15c4f06aeb1a1fb5da53c365f
mem: Update mostly exclusive policy even further

This patch takes yet another step in maintaining the clusivity, in
that it allows a mostly-inclusive cache to hold on to blocks even when
responding to a ReadExReq or UpgradeReq. Previously the cache simply
invalidated these blocks, but there is no strict need to do so.

The most important part of this patch is that we simply mark the block
clean when satisfying the upstream request where the cache is allowed
to keep the block. The only tricky part of the patch is in the memory
management of deferred snoops, where we need to distinguish the cases
where only the packet was copied (we expected to respond), and the
cases where we created an entirely new packet and request (we kept it
only to replay later).

The code in satisfyRequest is definitely ready for some refactoring
after this.

Change-Id: I201ddc7b2582eaa46fb8cff0c7ad09e02d64b0fc
Reviewed-by: Nikos Nikoleris <nikos.nikoleris@arm.com>
Reviewed-by: Tony Gutierrez <anthony.gutierrez@amd.com>
src/mem/cache/cache.cc