mem: Cancel cache retry event when blocking port

This patch solves the corner case scenario where the sendRetryEvent could be
scheduled twice, when an io device stresses the IOcache in the system. This
should not be possible in the cache system.
This commit is contained in:
Rene de Jong 2013-03-26 14:46:51 -04:00
parent 08f7a8bc00
commit 87089175cc

View file

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2012 ARM Limited * Copyright (c) 2012-2013 ARM Limited
* All rights reserved. * All rights reserved.
* *
* The license below extends only to copyright in the software and shall * The license below extends only to copyright in the software and shall
@ -88,6 +88,13 @@ BaseCache::CacheSlavePort::setBlocked()
assert(!blocked); assert(!blocked);
DPRINTF(CachePort, "Cache port %s blocking new requests\n", name()); DPRINTF(CachePort, "Cache port %s blocking new requests\n", name());
blocked = true; blocked = true;
// if we already scheduled a retry in this cycle, but it has not yet
// happened, cancel it
if (sendRetryEvent.scheduled()) {
owner.deschedule(sendRetryEvent);
DPRINTF(CachePort, "Cache port %s deschedule retry\n", name());
mustSendRetry = true;
}
} }
void void