Nikos Nikoleris has submitted this change and it was merged. (
https://gem5-review.googlesource.com/10421 )
Change subject: mem-cache: Simplify writeback for the tempBlock in
recvTimingResp
......................................................................
mem-cache: Simplify writeback for the tempBlock in recvTimingResp
When we use the tempBlock to fill-in, we have to write it back and
invalidate it at the end of current transaction. This patch simplifies
the writeback flow by treating it as a regular writeback.
Change-Id: I257be7bbff211e2832ad001a4e991daf67704485
Reviewed-on: https://gem5-review.googlesource.com/10421
Reviewed-by: Daniel Carvalho <[email protected]>
Reviewed-by: Jason Lowe-Power <[email protected]>
Maintainer: Nikos Nikoleris <[email protected]>
---
M src/mem/cache/cache.cc
1 file changed, 7 insertions(+), 23 deletions(-)
Approvals:
Jason Lowe-Power: Looks good to me, but someone else must approve
Daniel Carvalho: Looks good to me, approved
Nikos Nikoleris: Looks good to me, approved
diff --git a/src/mem/cache/cache.cc b/src/mem/cache/cache.cc
index 2d3ab83..b9625be 100644
--- a/src/mem/cache/cache.cc
+++ b/src/mem/cache/cache.cc
@@ -1611,33 +1611,17 @@
// reset the xbar additional timinig as it is now accounted for
pkt->headerDelay = pkt->payloadDelay = 0;
- // copy writebacks to write buffer
- doWritebacks(writebacks, forward_time);
-
// if we used temp block, check to see if its valid and then clear it
out
if (blk == tempBlock && tempBlock->isValid()) {
- // We use forwardLatency here because we are copying
- // Writebacks/CleanEvicts to write buffer. It specifies the
latency to
- // allocate an internal buffer and to schedule an event to the
- // queued port.
- if (blk->isDirty() || writebackClean) {
- PacketPtr wbPkt = writebackBlk(blk);
- allocateWriteBuffer(wbPkt, forward_time);
- // Set BLOCK_CACHED flag if cached above.
- if (isCachedAbove(wbPkt))
- wbPkt->setBlockCached();
- } else {
- PacketPtr wcPkt = cleanEvictBlk(blk);
- // Check to see if block is cached above. If not allocate
- // write buffer
- if (isCachedAbove(wcPkt))
- delete wcPkt;
- else
- allocateWriteBuffer(wcPkt, forward_time);
- }
- invalidateBlock(blk);
+ PacketPtr wb_pkt = tempBlock->isDirty() || writebackClean ?
+ writebackBlk(blk) : cleanEvictBlk(blk);
+ writebacks.push_back(wb_pkt);
+ invalidateBlock(tempBlock);
}
+ // copy writebacks to write buffer
+ doWritebacks(writebacks, forward_time);
+
DPRINTF(CacheVerbose, "%s: Leaving with %s\n", __func__, pkt->print());
delete pkt;
}
--
To view, visit https://gem5-review.googlesource.com/10421
To unsubscribe, or for help writing mail filters, visit
https://gem5-review.googlesource.com/settings
Gerrit-Project: public/gem5
Gerrit-Branch: master
Gerrit-Change-Id: I257be7bbff211e2832ad001a4e991daf67704485
Gerrit-Change-Number: 10421
Gerrit-PatchSet: 2
Gerrit-Owner: Nikos Nikoleris <[email protected]>
Gerrit-Reviewer: Daniel Carvalho <[email protected]>
Gerrit-Reviewer: Jason Lowe-Power <[email protected]>
Gerrit-Reviewer: Nikos Nikoleris <[email protected]>
Gerrit-MessageType: merged
_______________________________________________
gem5-dev mailing list
[email protected]
http://m5sim.org/mailman/listinfo/gem5-dev