From: Tiago Mück Date: Fri, 21 Jun 2019 00:06:20 +0000 (-0500) Subject: mem-ruby: fix possible MOESI_CMP deadlock X-Git-Tag: v20.1.0.0~655 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=d9cb548d83fa81858599807f54b52e5be35a6b03;p=gem5.git mem-ruby: fix possible MOESI_CMP deadlock 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 Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/21929 Reviewed-by: Jason Lowe-Power Maintainer: Jason Lowe-Power Tested-by: kokoro --- diff --git a/src/mem/ruby/protocol/MOESI_CMP_directory-L2cache.sm b/src/mem/ruby/protocol/MOESI_CMP_directory-L2cache.sm index 3c7763f64..989410768 100644 --- a/src/mem/ruby/protocol/MOESI_CMP_directory-L2cache.sm +++ b/src/mem/ruby/protocol/MOESI_CMP_directory-L2cache.sm @@ -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; }