ruby: Fix the way stall map size is checked for availability
authorSrikant Bharadwaj <srikant.bharadwaj@amd.com>
Mon, 26 Aug 2019 20:41:04 +0000 (16:41 -0400)
committerSrikant Bharadwaj <srikant.bharadwaj@amd.com>
Tue, 3 Sep 2019 23:04:31 +0000 (23:04 +0000)
commitc67c11b60f7af8f831f42821e1e6953a5bd9c0fe
treec1efa2b9a42644d3fe5d32afa0a8ec5d37536558
parent5cc0db697dc1e3d378178c54dc4905ea8d2a2c8e
ruby: Fix the way stall map size is checked for availability

To ensure that enqueuer observes the practical availability. We
check the message buffer queue size at the start of the cycle.
We also add the size of the stall queue to consider the total
queue size. However, messages can be moved from regular queue
to stall map. This leads to messages being considered twice leading
to false flow control. This patch fixes it by storing the stall map
size at the beginning of the cycle and considering it for checking
availability.

Change-Id: I6ea94f34fe5279b91f74e106d43263e55ec4bf06
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/20389
Maintainer: Jason Lowe-Power <jason@lowepower.com>
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Jason Lowe-Power <jason@lowepower.com>
src/mem/ruby/network/MessageBuffer.cc
src/mem/ruby/network/MessageBuffer.hh