From d9cb548d83fa81858599807f54b52e5be35a6b03 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Tiago=20M=C3=BCck?= Date: Thu, 20 Jun 2019 19:06:20 -0500 Subject: [PATCH] mem-ruby: fix possible MOESI_CMP deadlock MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit 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 --- src/mem/ruby/protocol/MOESI_CMP_directory-L2cache.sm | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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; } -- 2.30.2