summaryrefslogtreecommitdiff
path: root/src/mem/packet_queue.hh
diff options
context:
space:
mode:
authorBrad Beckmann <Brad.Beckmann@amd.com>2015-07-20 09:15:18 -0500
committerBrad Beckmann <Brad.Beckmann@amd.com>2015-07-20 09:15:18 -0500
commitaef8d851bde80f0148ad234d3b216461d364dba3 (patch)
tree515173d9d180adb9115889b3d86bdb941cd26b63 /src/mem/packet_queue.hh
parent7678ddeb46afc24488cfad776350b586bb5d2b30 (diff)
downloadgem5-aef8d851bde80f0148ad234d3b216461d364dba3.tar.xz
mem: add boolean to disable PacketQueue's size sanity check
the sanity check, while generally useful for exposing memory system bugs, may be spurious with respect to GPU workloads, which may generate many more requests than typical CPU workloads. the large number of requests generated by the GPU may cause the req/resp queues to back up, thus queueing more than 100 packets.
Diffstat (limited to 'src/mem/packet_queue.hh')
-rw-r--r--src/mem/packet_queue.hh20
1 files changed, 19 insertions, 1 deletions
diff --git a/src/mem/packet_queue.hh b/src/mem/packet_queue.hh
index 866a4477a..b1001e75d 100644
--- a/src/mem/packet_queue.hh
+++ b/src/mem/packet_queue.hh
@@ -89,6 +89,13 @@ class PacketQueue : public Drainable
/** Event used to call processSendEvent. */
EventWrapper<PacketQueue, &PacketQueue::processSendEvent> sendEvent;
+ /*
+ * Optionally disable the sanity check
+ * on the size of the transmitList. The
+ * sanity check will be enabled by default.
+ */
+ bool _disableSanityCheck;
+
protected:
/** Label to use for print request packets label stack. */
@@ -123,8 +130,11 @@ class PacketQueue : public Drainable
*
* @param _em Event manager used for scheduling this queue
* @param _label Label to push on the label stack for print request packets
+ * @param disable_sanity_check Flag used to disable the sanity check
+ * on the size of the transmitList. The check is enabled by default.
*/
- PacketQueue(EventManager& _em, const std::string& _label);
+ PacketQueue(EventManager& _em, const std::string& _label,
+ bool disable_sanity_check = false);
/**
* Virtual desctructor since the class may be used as a base class.
@@ -187,6 +197,14 @@ class PacketQueue : public Drainable
*/
void retry();
+ /**
+ * This allows a user to explicitly disable the sanity check
+ * on the size of the transmitList, which is enabled by default.
+ * Users must use this function to explicitly disable the sanity
+ * check.
+ */
+ void disableSanityCheck() { _disableSanityCheck = true; }
+
DrainState drain() override;
};