changeset 7b7e352f8d7f in /z/repo/gem5
details: http://repo.gem5.org/gem5?cmd=changeset;node=7b7e352f8d7f
description:
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:
src/mem/packet_queue.cc | 9 +++++----
src/mem/packet_queue.hh | 20 +++++++++++++++++++-
2 files changed, 24 insertions(+), 5 deletions(-)
diffs (71 lines):
diff -r 2375b33bddc6 -r 7b7e352f8d7f src/mem/packet_queue.cc
--- a/src/mem/packet_queue.cc Fri Nov 13 17:03:48 2015 -0500
+++ b/src/mem/packet_queue.cc Mon Jul 20 09:15:18 2015 -0500
@@ -48,9 +48,10 @@
using namespace std;
-PacketQueue::PacketQueue(EventManager& _em, const std::string& _label)
- : em(_em), sendEvent(this), label(_label),
- waitingOnRetry(false)
+PacketQueue::PacketQueue(EventManager& _em, const std::string& _label,
+ bool disable_sanity_check)
+ : em(_em), sendEvent(this), _disableSanityCheck(disable_sanity_check),
+ label(_label), waitingOnRetry(false)
{
}
@@ -114,7 +115,7 @@
// add a very basic sanity check on the port to ensure the
// invisible buffer is not growing beyond reasonable limits
- if (transmitList.size() > 100) {
+ if (!_disableSanityCheck && transmitList.size() > 100) {
panic("Packet queue %s has grown beyond 100 packets\n",
name());
}
diff -r 2375b33bddc6 -r 7b7e352f8d7f src/mem/packet_queue.hh
--- a/src/mem/packet_queue.hh Fri Nov 13 17:03:48 2015 -0500
+++ b/src/mem/packet_queue.hh Mon Jul 20 09:15:18 2015 -0500
@@ -89,6 +89,13 @@
/** 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 @@
*
* @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 @@
*/
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;
};
_______________________________________________
gem5-dev mailing list
[email protected]
http://m5sim.org/mailman/listinfo/gem5-dev