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

Change subject: mem: Handle CMO responses in the snoop filter
......................................................................

mem: Handle CMO responses in the snoop filter

Previously responses would either transfer the ownership of the line
or the actual data to the cache that send out the original request.
Cache clean operations are different since they bring neither data nor
ownership. When they are also invalidating the cache that send out the
original request will invalidate any existing copies. This patch
makes the snoop filter handle the cache clean responses accordingly.

Change-Id: I27165cb45b9dc57882526329c62db35f100d23df
Reviewed-by: Stephan Diestelhorst <[email protected]>
Reviewed-by: Sudhanshu Jha <[email protected]>
Reviewed-by: Anouk Van Laer <[email protected]>
Reviewed-on: https://gem5-review.googlesource.com/5053
Maintainer: Nikos Nikoleris <[email protected]>
Reviewed-by: Jason Lowe-Power <[email protected]>
---
M src/mem/snoop_filter.cc
1 file changed, 15 insertions(+), 3 deletions(-)

Approvals:
  Jason Lowe-Power: Looks good to me, approved
  Anouk Van Laer: Looks good to me, but someone else must approve
  Nikos Nikoleris: Looks good to me, approved



diff --git a/src/mem/snoop_filter.cc b/src/mem/snoop_filter.cc
index 252fbb5..3e1dae6 100755
--- a/src/mem/snoop_filter.cc
+++ b/src/mem/snoop_filter.cc
@@ -362,10 +362,22 @@
     panic_if(!(sf_item.requested & slave_mask), "SF value %x.%x missing "\
              "request bit\n", sf_item.requested, sf_item.holder);

-    // Update the residency of the cache line.
-    sf_item.holder |=  slave_mask;
     sf_item.requested &= ~slave_mask;
-    assert(sf_item.holder | sf_item.requested);
+    // Update the residency of the cache line.
+
+    if (cpkt->req->isCacheMaintenance()) {
+        // A cache clean response does not carry any data so it
+        // shouldn't change the holders, unless it is invalidating.
+        if (cpkt->isInvalidate()) {
+            sf_item.holder &= ~slave_mask;
+        }
+        eraseIfNullEntry(sf_it);
+    } else {
+        // Any other response implies that a cache above will have the
+        // block.
+        sf_item.holder |= slave_mask;
+        assert(sf_item.holder | sf_item.requested);
+    }
     DPRINTF(SnoopFilter, "%s:   new SF value %x.%x\n",
             __func__, sf_item.requested, sf_item.holder);
 }

--
To view, visit https://gem5-review.googlesource.com/5053
To unsubscribe, or for help writing mail filters, visit https://gem5-review.googlesource.com/settings

Gerrit-Project: public/gem5
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: I27165cb45b9dc57882526329c62db35f100d23df
Gerrit-Change-Number: 5053
Gerrit-PatchSet: 4
Gerrit-Owner: Nikos Nikoleris <[email protected]>
Gerrit-Reviewer: Anouk Van Laer <[email protected]>
Gerrit-Reviewer: Jason Lowe-Power <[email protected]>
Gerrit-Reviewer: Nikos Nikoleris <[email protected]>
_______________________________________________
gem5-dev mailing list
[email protected]
http://m5sim.org/mailman/listinfo/gem5-dev

Reply via email to