Cache: Fix an issue with LRU when bonus block is used to complete transaction.
authorAli Saidi <Ali.Saidi@ARM.com>
Thu, 1 Mar 2012 23:26:31 +0000 (17:26 -0600)
committerAli Saidi <Ali.Saidi@ARM.com>
Thu, 1 Mar 2012 23:26:31 +0000 (17:26 -0600)
The block is never inserted because it's the one extra block in the cache, but
it can be invalidated twice in a row. In that case the block doesn't have a
new master id (beacuse it was never inserted), however it is valid and
the accounting goes wrong at that point.

src/mem/cache/cache_impl.hh

index 40359d31e753df4dbfcc5f7d0221cec68d4a20ce..024ae32973e300155755a206d36dd13a3363dfe6 100644 (file)
@@ -994,6 +994,7 @@ Cache<TagStore>::handleResponse(PacketPtr pkt)
         if (blk->isDirty()) {
             allocateWriteBuffer(writebackBlk(blk), time, true);
         }
+        blk->status &= ~BlkValid;
         tags->invalidateBlk(blk);
     }