mem-ruby: Prevent response stalls on MOESI_CMP_directory
When a message triggers a transition that has actions which allocate
TBEs, the generated code automatically includes a check for the TBETable
size before executing any action. If the table is full, the transition
returns TransitionResult_ResourceStall and no more messages from the
buffer are handled (until the next cycle).
This behavior may lead to deadlocks in the MOESI_CMP_directory protocol
since events triggered by the response queue may allocate TBEs (e.g.
L2 replacements triggered by the response queue). If the table is full,
the queue is stalled preventing other responses from freeing TBEs.
This patch fixes this by handling WRITEBACK_DIRTY_DATA/CLEAN_DATA messages
as requests and WB_ACK/WB_NACK as responses. All controllers are changed
to work with the new types. With this fix, responses are always
handled first in all controllers, and no response triggers TBE
Signed-off-by: Tiago Muck <email@example.com>
Tested-by: kokoro <firstname.lastname@example.org>
Reviewed-by: Matthew Poremba <email@example.com>
Reviewed-by: Nikos Nikoleris <firstname.lastname@example.org>
Reviewed-by: John Alsop <email@example.com>
Maintainer: Jason Lowe-Power <firstname.lastname@example.org>
5 files changed