mem-ruby: Do not change blocked msg enqueue info

Updating the message counter and enqueue times when adding blocked
messages back to the queue does not make a lot of sense since these
messages are not new arrivals.
More importantly, this may lead to starvation. See the scenario below:

1) Request A for a blocked line X arrives
2) A is handled; X is blocked so A is stalled
3) Request B for X arrives; Reponse for X arrives
4) Response is handled; X unblocked; A added back to the request queue
5) B is handled ahead of A (since A's arrival was updated);
   X may become blocked again

If new requests keep comming for X, A may will be stalled forever.

Change-Id: Icad79f3f716a870e91cb3455437b8b3c35f130ac
Signed-off-by: Tiago Muck <>
Tested-by: kokoro <>
Reviewed-by: Jason Lowe-Power <>
Reviewed-by: Matthew Poremba <>
Maintainer: Jason Lowe-Power <>
diff --git a/src/mem/ruby/network/ b/src/mem/ruby/network/
index 560b69c..03d1bb0 100644
--- a/src/mem/ruby/network/
+++ b/src/mem/ruby/network/
@@ -297,16 +297,18 @@
 MessageBuffer::reanalyzeList(list<MsgPtr> &lt, Tick schdTick)
     while (!lt.empty()) {
-        m_msg_counter++;
         MsgPtr m = lt.front();
-        m->setLastEnqueueTime(schdTick);
-        m->setMsgCounter(m_msg_counter);
+        assert(m->getLastEnqueueTime() <= schdTick);
         push_heap(m_prio_heap.begin(), m_prio_heap.end(),
+        DPRINTF(RubyQueue, "Requeue arrival_time: %lld, Message: %s\n",
+            schdTick, *(m.get()));