-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Description
Describe the bug
I'm repeatedly encountering situations where the MemCtrl stops scheduling requests even though mem_intr->writeQueueSize is not zero.
Please refer to the this conversation for a full description of the issue.
I cannot perfectly reproduce the behaviour but I have captured a packet sequence that I play into the MemCtrl. The behaviour is not the same as the non-draining behaviour but the MemCtrl gets into state where it prints
<timestamp> : system.mem_ctrl: QoS Turnarounds selected state
forever.
Affects version
gem5 version 24.0.0.1
gem5 Modifications
I have not modified the gem5 sources but I have added some sim objects as EXTRAS. None of those sim objects are used in the reproduction.
To Reproduce
Fetch the gitlab following gists:
Alternatively browse my gists: https://gist.github.com/olumide-x
Next:
- Build the PacketReplayer source as an EXTRA or add it to the gem5 source directory.
- Execute the simulation with the default values and with the PacketReplayer debug flag as follows:
./gem5.debug --debug-flags=PacketReplayer packet_replayer_config.py
. You will notice that simulation seems to halt. - Edit packet_replayer_config.py and reduce the
num_lines
parameter (on line 18) to say 10 and rerun. This time the simulation self-terminates. - Rerun the simulation with the original
num_lines
parameter but enable theMemCtrl
debug flag, like so./gem5.debug --debug-flags=MemCtrl packet_replayer_config.py
. You should find that the MemCtrl seems to get stuck in a loop as shown in the terminal output below.
Terminal Output
...
12563782: system.mem_ctrl: QoS Turnarounds selected state WRITE
12563782: system.mem_ctrl: Access to 0x3c03c000, ready at 12610141 next burst at 12596504.
12563782: system.mem_ctrl: Command for 0x3c03c000, issued at 12592872.
12567414: system.mem_ctrl: QoS Turnarounds selected state WRITE
12567414: system.mem_ctrl: Removing burstTick for 12560000
12567414: system.mem_ctrl: Access to 0x3c03bec0, ready at 12613773 next burst at 12600136.
12567414: system.mem_ctrl: Command for 0x3c03bec0, issued at 12596504.
12571046: system.mem_ctrl: QoS Turnarounds selected state WRITE [turnaround triggered]
12571046: system.mem_ctrl: Switching to reads after 73 writes with 15 writes waiting
15851365: system.mem_ctrl: QoS Turnarounds selected state READ
19722275: system.mem_ctrl: QoS Turnarounds selected state READ
23607730: system.mem_ctrl: QoS Turnarounds selected state READ
27493185: system.mem_ctrl: QoS Turnarounds selected state READ
31378640: system.mem_ctrl: QoS Turnarounds selected state READ
35264095: system.mem_ctrl: QoS Turnarounds selected state READ
39149550: system.mem_ctrl: QoS Turnarounds selected state READ
43035005: system.mem_ctrl: QoS Turnarounds selected state READ
46920460: system.mem_ctrl: QoS Turnarounds selected state READ
50805915: system.mem_ctrl: QoS Turnarounds selected state READ
54691370: system.mem_ctrl: QoS Turnarounds selected state READ
58576825: system.mem_ctrl: QoS Turnarounds selected state READ
62462280: system.mem_ctrl: QoS Turnarounds selected state READ
66347735: system.mem_ctrl: QoS Turnarounds selected state READ
70233190: system.mem_ctrl: QoS Turnarounds selected state READ
74118645: system.mem_ctrl: QoS Turnarounds selected state READ
78004100: system.mem_ctrl: QoS Turnarounds selected state READ
81889555: system.mem_ctrl: QoS Turnarounds selected state READ
85775010: system.mem_ctrl: QoS Turnarounds selected state READ
89660465: system.mem_ctrl: QoS Turnarounds selected state READ
93545920: system.mem_ctrl: QoS Turnarounds selected state READ
97431375: system.mem_ctrl: QoS Turnarounds selected state READ
101316830: system.mem_ctrl: QoS Turnarounds selected state READ
105202285: system.mem_ctrl: QoS Turnarounds selected state READ
109087740: system.mem_ctrl: QoS Turnarounds selected state READ
112973195: system.mem_ctrl: QoS Turnarounds selected state READ
...
Additionally: rename "WriteReq" to "ReadReq" in packets.log and rerun. You should notice the same behaviour.
Expected behaviour
The MemCtrl ought to be able to handle any pattern of traffic.
Host Operating System
Ubuntu 22.04.5 LTS
Host ISA
AMD x64
Compiler used
g++ 13.1.0