summaryrefslogtreecommitdiff
path: root/src/mem/cache/queue.hh
diff options
context:
space:
mode:
authorAndreas Hansson <andreas.hansson@arm.com>2016-03-17 09:51:22 -0400
committerAndreas Hansson <andreas.hansson@arm.com>2016-03-17 09:51:22 -0400
commitabcbc4e51e21c95fa241d19ed13978ea25b26982 (patch)
tree40dc2f9b3fa227212c2dde335451122fbf4e8411 /src/mem/cache/queue.hh
parent7a40e7864a99140f18049a6f97163eebca2c891e (diff)
downloadgem5-abcbc4e51e21c95fa241d19ed13978ea25b26982.tar.xz
mem: Adjust cache queue reserve to more conservative values
The cache queue reserve is there as an overflow to give us enough headroom based on when we block the cache, and how many transactions we may already have accepted before actually blocking. The previous values were probably chosen to be "big enough", when we actually know that we check the MSHRs after every single allocation, and for the write buffers we know that we implicitly may need one entry for every outstanding MSHR. * * * mem: Adjust cache queue reserve to more conservative values The cache queue reserve is there as an overflow to give us enough headroom based on when we block the cache, and how many transactions we may already have accepted before actually blocking. The previous values were probably chosen to be "big enough", when we actually know that we check the MSHRs after every single allocation, and for the write buffers we know that we implicitly may need one entry for every outstanding MSHR.
Diffstat (limited to 'src/mem/cache/queue.hh')
-rw-r--r--src/mem/cache/queue.hh8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/mem/cache/queue.hh b/src/mem/cache/queue.hh
index 11d456e11..fb3e73608 100644
--- a/src/mem/cache/queue.hh
+++ b/src/mem/cache/queue.hh
@@ -69,7 +69,7 @@ class Queue : public Drainable
/**
* The total number of entries in this queue. This number is set
- * as the number of entries requested plus (numReserve - 1). This
+ * as the number of entries requested plus any reserve. This
* allows for the same number of effective entries while still
* maintaining an overflow reserve.
*/
@@ -120,10 +120,10 @@ class Queue : public Drainable
* Create a queue with a given number of entries.
*
* @param num_entries The number of entries in this queue.
- * @param num_overflow The extra overflow entries needed.
+ * @param reserve The extra overflow entries needed.
*/
Queue(const std::string &_label, int num_entries, int reserve) :
- label(_label), numEntries(num_entries + reserve - 1),
+ label(_label), numEntries(num_entries + reserve),
numReserve(reserve), entries(numEntries), _numInService(0),
allocated(0)
{
@@ -139,7 +139,7 @@ class Queue : public Drainable
bool isFull() const
{
- return (allocated > numEntries - numReserve);
+ return (allocated >= numEntries - numReserve);
}
int numInService() const