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 <timothy.hayes@arm.com> Reviewed-by: John Alsop <johnathan.alsop@amd.com> Maintainer: Bradford Beckmann <brad.beckmann@amd.com> Tested-by: kokoro <noreply+kokoro@google.com>
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user