From: Hussein Elnawawy Date: Fri, 21 Feb 2020 21:36:15 +0000 (-0500) Subject: mem-ruby: Checkpoint from MOESI_hammer Ruby hangs X-Git-Tag: v20.0.0.0~249 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=d36f2fda1257b946b5d210a63abde2db186849f4;p=gem5.git mem-ruby: Checkpoint from MOESI_hammer Ruby hangs Fix MOESI_hammer checkpoint hanging. The function markRemoved() should be called before hitCallback(), not after it. The reason is that hitCallback() checks if draining is complete based on the value of "m_outstanding_count". And since markRemoved() is responsible for decrementing "m_outstanding_count", hitCallback() does not see that there are no outstanding requests. Reported by: Timothy Hayes Jira: https://gem5.atlassian.net/browse/GEM5-331 Change-Id: I14c34be79843b172ae994ab1792fe4ce6cf5cf6e Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/25683 Reviewed-by: Timothy Hayes Reviewed-by: John Alsop Maintainer: Bradford Beckmann Tested-by: kokoro --- diff --git a/src/mem/ruby/system/Sequencer.cc b/src/mem/ruby/system/Sequencer.cc index a90523e76..f81578700 100644 --- a/src/mem/ruby/system/Sequencer.cc +++ b/src/mem/ruby/system/Sequencer.cc @@ -360,20 +360,22 @@ Sequencer::writeCallback(Addr address, DataBlock& data, } else { aliased_stores++; } + markRemoved(); + ruby_request = false; hitCallback(&seq_req, data, success, mach, externalHit, initialRequestTime, forwardRequestTime, firstResponseTime); } else { // handle read request assert(!ruby_request); + markRemoved(); + ruby_request = false; aliased_loads++; hitCallback(&seq_req, data, true, mach, externalHit, initialRequestTime, forwardRequestTime, firstResponseTime); } seq_req_list.pop_front(); - markRemoved(); - ruby_request = false; } // free all outstanding requests corresponding to this address @@ -421,12 +423,12 @@ Sequencer::readCallback(Addr address, DataBlock& data, initialRequestTime, forwardRequestTime, firstResponseTime); } + markRemoved(); + ruby_request = false; hitCallback(&seq_req, data, true, mach, externalHit, initialRequestTime, forwardRequestTime, firstResponseTime); seq_req_list.pop_front(); - markRemoved(); - ruby_request = false; } // free all outstanding requests corresponding to this address