mem: Remove unused cache squash functionality
authorAndreas Hansson <andreas.hansson@arm.com>
Mon, 28 Dec 2015 16:14:16 +0000 (11:14 -0500)
committerAndreas Hansson <andreas.hansson@arm.com>
Mon, 28 Dec 2015 16:14:16 +0000 (11:14 -0500)
This patch removes the unused squash function from the MSHR queue, and
the associated (and also unused) threadNum member from the MSHR.

src/mem/cache/cache.cc
src/mem/cache/mshr.cc
src/mem/cache/mshr.hh
src/mem/cache/mshr_queue.cc
src/mem/cache/mshr_queue.hh

index 489f198c0b07b71b1eafe4abd6173f6d9252441b..c10315499f4c3ac0ccde96011fa7ad2d32e4b331 100644 (file)
@@ -807,9 +807,6 @@ Cache::recvTimingReq(PacketPtr pkt)
 
                     assert(pkt->req->masterId() < system->maxMasters());
                     mshr_hits[pkt->cmdToIndex()][pkt->req->masterId()]++;
-                    if (mshr->threadNum != 0/*pkt->req->threadId()*/) {
-                        mshr->threadNum = -1;
-                    }
                     // We use forward_time here because it is the same
                     // considering new targets. We have multiple
                     // requests for the same address here. It
index 1a97d5594e336474a39f725f79c795f3eb208302..7f7b627dac0008a25e0ea6a5879b890b2a36a745 100644 (file)
@@ -67,7 +67,7 @@ MSHR::MSHR() : readyTime(0), _isUncacheable(false), downstreamPending(false),
                queue(NULL), order(0), blkAddr(0),
                blkSize(0), isSecure(false), inService(false),
                isForward(false), allocOnFill(false),
-               threadNum(InvalidThreadID), data(NULL)
+               data(NULL)
 {
 }
 
@@ -216,7 +216,6 @@ MSHR::allocate(Addr blk_addr, unsigned blk_size, PacketPtr target,
     _isUncacheable = target->req->isUncacheable();
     inService = false;
     downstreamPending = false;
-    threadNum = 0;
     assert(targets.isReset());
     // Don't know of a case where we would allocate a new MSHR for a
     // snoop (mem-side request), so set source according to request here
index 45d7628fdba8232dc4e6e8090bdce7e7d4e4ea3a..0abb70e2912ae08fbf6c2a87f8d51e72e04fe5be 100644 (file)
@@ -184,9 +184,6 @@ class MSHR : public Packet::SenderState, public Printable
         assert(inService); return postDowngrade;
     }
 
-    /** Thread number of the miss. */
-    ThreadID threadNum;
-
   private:
 
     /** Data buffer (if needed).  Currently used only for pending
index 3aa5d85be802c1004d396a4510f016e674f1c427..6efd291b82934cc0e0bbccbc68137a4a99faa2a4 100644 (file)
@@ -239,30 +239,6 @@ MSHRQueue::forceDeallocateTarget(MSHR *mshr)
     return was_full && !isFull();
 }
 
-void
-MSHRQueue::squash(int threadNum)
-{
-    for (auto i = allocatedList.begin(); i != allocatedList.end();) {
-        MSHR *mshr = *i;
-        if (mshr->threadNum == threadNum) {
-            while (mshr->hasTargets()) {
-                mshr->popTarget();
-                assert(0/*target->req->threadId()*/ == threadNum);
-            }
-            assert(!mshr->hasTargets());
-            assert(mshr->getNumTargets()==0);
-            if (!mshr->inService) {
-                i = deallocateOne(mshr);
-            } else {
-                //mshr->pkt->flags &= ~CACHE_LINE_FILL;
-                ++i;
-            }
-        } else {
-            ++i;
-        }
-    }
-}
-
 DrainState
 MSHRQueue::drain()
 {
index 29191a358d1f4e2ed88573a3e11233c42f9f9714..a2ad6d020bdfb2a5c2891413c6302f1ba491e154 100644 (file)
@@ -170,7 +170,7 @@ class MSHRQueue : public Drainable
 
     /**
      * Remove a MSHR from the queue. Returns an iterator into the
-     * allocatedList for faster squash implementation.
+     * allocatedList.
      * @param mshr The MSHR to remove.
      * @return An iterator to the next entry in the allocatedList.
      */
@@ -199,13 +199,6 @@ class MSHRQueue : public Drainable
      */
     void markPending(MSHR *mshr);
 
-    /**
-     * Squash outstanding requests with the given thread number. If a request
-     * is in service, just squashes the targets.
-     * @param threadNum The thread to squash.
-     */
-    void squash(int threadNum);
-
     /**
      * Deallocate top target, possibly freeing the MSHR
      * @return if MSHR queue is no longer full