Nikos Nikoleris has submitted this change and it was merged. ( https://gem5-review.googlesource.com/11018 )

Change subject: mem-cache: Promote deferred targets on cache clean responses
......................................................................

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 <[email protected]>
Reviewed-by: Jason Lowe-Power <[email protected]>
Maintainer: Jason Lowe-Power <[email protected]>
---
M src/mem/cache/base.cc
M src/mem/cache/cache.cc
2 files changed, 10 insertions(+), 6 deletions(-)

Approvals:
  Jason Lowe-Power: Looks good to me, approved; Looks good to me, approved
  Daniel Carvalho: Looks good to me, but someone else must approve



diff --git a/src/mem/cache/base.cc b/src/mem/cache/base.cc
index a510bac..8fd9ac2 100644
--- a/src/mem/cache/base.cc
+++ b/src/mem/cache/base.cc
@@ -491,6 +491,12 @@
         // 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 @@
             pkt->setCacheResponding();
             blk->status &= ~BlkDirty;
         }
+    } else if (pkt->isClean()) {
+        blk->status &= ~BlkDirty;
     } else {
         assert(pkt->isInvalidate());
         invalidateBlock(blk);
diff --git a/src/mem/cache/cache.cc b/src/mem/cache/cache.cc
index ffd6081..9b16129 100644
--- a/src/mem/cache/cache.cc
+++ b/src/mem/cache/cache.cc
@@ -674,8 +674,6 @@
     const int initial_offset = initial_tgt->pkt->getOffset(blkSize);

     const bool is_error = pkt->isError();
-    bool is_fill = !mshr->isForward &&
-        (pkt->isRead() || pkt->cmd == MemCmd::UpgradeResp);
     // allow invalidation responses originating from write-line
     // requests to be discarded
     bool is_invalidate = pkt->isInvalidate();
@@ -716,13 +714,11 @@
                                  targets.allocOnFill);
                 assert(blk);

-                // treat as a fill, and discard the invalidation
-                // response
-                is_fill = true;
+                // discard the invalidation response
                 is_invalidate = false;
             }

-            if (is_fill) {
+            if (blk && blk->isValid() && !mshr->isForward) {
satisfyRequest(tgt_pkt, blk, true, mshr->hasPostDowngrade());

                 // How many bytes past the first request is this one

--
To view, visit https://gem5-review.googlesource.com/11018
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: Ief47e74d07749a6a9736ab450eb46eefa53464a2
Gerrit-Change-Number: 11018
Gerrit-PatchSet: 5
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

Reply via email to