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 <firstname.lastname@example.org>
Tested-by: kokoro <email@example.com>
Reviewed-by: Matthew Poremba <firstname.lastname@example.org>
Reviewed-by: Nikos Nikoleris <email@example.com>
Reviewed-by: John Alsop <firstname.lastname@example.org>
Maintainer: Jason Lowe-Power <email@example.com>
5 files changed