mem-garnet: Separable allocator in Garnet not fair enough.

Currently there are independent round robin arbiter at each
input port and output port. Every time a VC is selected for
output allocation round robin is incremented irrespective of
if it is selected by its output port or not. This leads to
unfair arbitration at input port and is well known[1]. This
patch fixes it to increment only if the output port also
selects it.

[1] D. U. Becker and W. J. Dally, "Allocator implementations
for network-on-chip routers," Proceedings of the Conference
on High Performance Computing Networking, Storage and
Analysis, Portland, OR, 2009, pp. 1-12

Change-Id: I65963fb8082c51c0e3c6e031a8b87b4f5c3626e1
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/32601
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
Maintainer: Jason Lowe-Power <power.jg@gmail.com>
This commit is contained in:
Srikant Bharadwaj
2019-07-16 17:15:57 -04:00
parent 028a1fa87e
commit d690ebed46

View File

@@ -130,11 +130,6 @@ SwitchAllocator::arbitrate_inports()
m_port_requests[outport][inport] = true;
m_vc_winners[outport][inport]= invc;
// Update Round Robin pointer to the next VC
m_round_robin_invc[inport] = invc + 1;
if (m_round_robin_invc[inport] >= m_num_vcs)
m_round_robin_invc[inport] = 0;
break; // got one vc winner for this port
}
}
@@ -248,6 +243,15 @@ SwitchAllocator::arbitrate_outports()
if (m_round_robin_inport[outport] >= m_num_inports)
m_round_robin_inport[outport] = 0;
// Update Round Robin pointer to the next VC
// We do it here to keep it fair.
// Only the VC which got switch traversal
// is updated.
m_round_robin_invc[inport] = invc + 1;
if (m_round_robin_invc[inport] >= m_num_vcs)
m_round_robin_invc[inport] = 0;
break; // got a input winner for this outport
}