mem-ruby: fix possible MOESI_CMP deadlock
authorTiago Mück <tiago.muck@arm.com>
Fri, 21 Jun 2019 00:06:20 +0000 (19:06 -0500)
committerTiago Mück <tiago.muck@arm.com>
Wed, 6 May 2020 14:42:33 +0000 (14:42 +0000)
Freeing the L2 block only after local invalidates are acked in the OLSF
state may lead to a deadlock.

Change-Id: Ia4b60e5bc9e2d3315b874a8c6616478db6eb38c1
Signed-off-by: Tiago Mück <tiago.muck@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/21929
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
Maintainer: Jason Lowe-Power <power.jg@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
src/mem/ruby/protocol/MOESI_CMP_directory-L2cache.sm

index 3c7763f64855e52299419e03de25c254804c9410..989410768bc947ac11c838aabe89749e28b3c5b9 100644 (file)
@@ -1910,6 +1910,9 @@ machine(MachineType:L2Cache, "Token protocol")
     i_allocateTBE;
     t_recordFwdXID;
     ee_sendLocalInv;
+    gg_clearLocalSharers;
+    checkCacheNoSharersNoOwner;
+    rr_deallocateL2CacheBlock;
     m_popRequestQueue;
   }
 
@@ -1921,10 +1924,7 @@ machine(MachineType:L2Cache, "Token protocol")
 
   transition(OLSF, All_Acks, I) {
     c_sendDataFromTBEToFwdGETX;
-    gg_clearLocalSharers;
     s_deallocateTBE;
-    checkCacheNoSharersNoOwner;
-    rr_deallocateL2CacheBlock;
     n_popTriggerQueue;
     wa_wakeUpDependents;
   }