mem: Remove unused cache squash functionality

This patch removes the unused squash function from the MSHR queue, and
the associated (and also unused) threadNum member from the MSHR.
This commit is contained in:
Andreas Hansson 2015-12-28 11:14:16 -05:00
parent fbf3987c7b
commit f6525ff221
5 changed files with 2 additions and 40 deletions

View 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

View 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

View 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

View 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()
{

View 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