Srikant Bharadwaj has uploaded this change for review. ( https://gem5-review.googlesource.com/c/public/gem5/+/32601 )

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

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
---
M src/mem/ruby/network/garnet2.0/SwitchAllocator.cc
1 file changed, 9 insertions(+), 5 deletions(-)



diff --git a/src/mem/ruby/network/garnet2.0/SwitchAllocator.cc b/src/mem/ruby/network/garnet2.0/SwitchAllocator.cc
index 3241343..1ed6de1 100644
--- a/src/mem/ruby/network/garnet2.0/SwitchAllocator.cc
+++ b/src/mem/ruby/network/garnet2.0/SwitchAllocator.cc
@@ -130,11 +130,6 @@
                     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 @@
                 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
             }


--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/32601
To unsubscribe, or for help writing mail filters, visit https://gem5-review.googlesource.com/settings

Gerrit-Project: public/gem5
Gerrit-Branch: develop
Gerrit-Change-Id: I65963fb8082c51c0e3c6e031a8b87b4f5c3626e1
Gerrit-Change-Number: 32601
Gerrit-PatchSet: 1
Gerrit-Owner: Srikant Bharadwaj <srikant.bharad...@amd.com>
Gerrit-MessageType: newchange
_______________________________________________
gem5-dev mailing list -- gem5-dev@gem5.org
To unsubscribe send an email to gem5-dev-le...@gem5.org
%(web_page_url)slistinfo%(cgiext)s/%(_internal_name)s

Reply via email to