Hi,
I am running into a deadlock/starvation problem using the
MOESI_CMP_directory protocol due to the recycling of messages on
blocked Addresses, and so I have converted the protocol to use the
Stall/Wait MessageBuffer Actions instead of recycling the messages.
However, in doing so, I am running into another problem with the
StallAndWait Implementation:
Currently, there are two ways to wake up stalled messages on the
in_ports of the Ruby Protocols ( wakeUpBuffers(Address addr) ,
$c_ident::wakeUpAllBuffers(), where the latter wakes up any stalled
messages (for any address on any port) whereas the former only wakes
up ports of lower rank.
$c_ident::wakeUpBuffers(Address addr)
{
if (m_waiting_buffers.count(addr) > 0) {
//
// Wake up all possible lower rank (i.e. lower priority)
buffers that could
// be waiting on this message.
//
DPRINTF(RubyGenerated, "address %s has %d waiting Buffers\\n",
addr, m_waitin\
g_buffers.count(addr));
DPRINTF(RubyGenerated, "Will not process port of rank[%d]\\n",
m_cur_in_port_\
rank);
for (int in_port_rank = m_cur_in_port_rank - 1;
in_port_rank >= 0;
in_port_rank--) {
if ((*(m_waiting_buffers[addr]))[in_port_rank] != NULL) {
(*(m_waiting_buffers[addr]))[in_port_rank]->reanalyzeMessages(addr);
DPRINTF(RubyGenerated, "reanalyzing waiting
buffer[%s][%d]\\n",
addr, in_port_rank);
}
}
delete m_waiting_buffers[addr];
m_waiting_buffers.erase(addr);
}
With the wakeupBuffers(Address addr) implementation, I believe that
since it only checks lower ranked ports, and reanalyzes those
messages, why does it have to delete the all the waiting messages for
the address (including for the port(s) of equal/greater priority?
I am running into an issue where I call kd_wakeUpDependents, but I am
calling it when the m_cur_in_port_rank >= the port rank that has the
stalled message. In this case, it does not reanalyze the
messageBuffer, which is ok, but at a later time when
kd_wakeUpDependents is called from a port rank that should trigger the
wakeups, it does not enter the if() condition because the
waiting_buffers have been previously deleted (even though the stalled
messages were never serviced).
Now I know as one solution I can call ka_wakeUpAllDependents Action
which would wakeupAllBuffers for all addresses/all ports, but that
seems a bit overkill/unnecessary and could lead to the messages for
unrelated addresses needing to be stalled again.
Thoughts?
Malek
_______________________________________________
gem5-users mailing list
[email protected]
http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users