ruby: Make MessageBuffers actually finite sized
Review Request #3283 - Created Jan. 17, 2016 and submitted
| Information | |
|---|---|
| Joel Hestness | |
| gem5 | |
| default | |
| 3753, 3752 | |
| Reviewers | |
| Default | |
Changeset 11298:1af0000a8d03 --------------------------- ruby: Make MessageBuffers actually finite sized When Ruby controllers stall messages in MessageBuffers, the buffer moves those messages off the priority heap and into a per-address stall map. When buffers are finite-sized, the test areNSlotsAvailable() only checks the size of the priority heap, but ignores the stall map, so the map is allowed to grow unbounded if the controller stalls numerous messages. This patch fixes the problem by tracking the stall map size and testing the total number of messages in the buffer appropriately.
Multiple tests to exercise the capacity of buffers, including high bandwidth
demand and MLP situations concurrently accessing numerous different line
addresses. Regressions are unchanged, since they do not use finite-sized
buffering.NOTE: When using finite-sized buffers, this fix can cause decreased
performance due to insufficient buffering, a condition that was masked with
the unbounded stall map. Users may need to adjust buffer sizes to revalidate
performance.
-
src/mem/ruby/network/MessageBuffer.hh (Diff revision 1) -
is there not a .size() on the map itself, or am I missunderstanding what is counted here?
could you perhaps add a comment and explain how it is used?
Description: |
|
||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Diff: |
Revision 2 (+30 -2) |
-
src/mem/ruby/network/MessageBuffer.cc (Diff revision 2) -
Seems fine to set m_stall_map_size to 0 directly after this loop, which is more efficient since this function might be called quite often.
I just have a suggestion to further improve the comment, but other than that, this patch looks great.
Also I'm curious, in your testing did you encounter any difficulties modeling finite buffering with the invisible buffer within QueuedSlavePort?
-
src/mem/ruby/network/MessageBuffer.hh (Diff revision 2) -
This comment is great! I think it is important to point out that messages moved back to the m_prio_heap in the order they were initially received and they are marked ready for the current cycle.
This behavior is very important to avoid pathological situations where older messages are starved by younger ones.
There is already comments in the .cc file that effectively say this, but if you are going to added detailed comments to this file as well, I think it is important to make that point.
Ship It!
Any chance we could ship this finally? I have been using this for months without any issues and have some new patches I would like to push out that depend on this one.
