Force prefetches to check cache and MSHRs immediately prior to issue.

This prevents redundant prefetches from being issued, solving the
occasional 'needsExclusive && !blk->isWritable()' assertion failure
in cache_impl.hh that several people have run into.
Eliminates "prefetch_cache_check_push" flag, neither setting of
which really solved the problem.
This commit is contained in:
Steve Reinhardt
2009-09-26 10:50:50 -07:00
parent f28ea7a6c9
commit 72cfed4164
4 changed files with 8 additions and 27 deletions

View File

@@ -45,7 +45,6 @@
BasePrefetcher::BasePrefetcher(const BaseCacheParams *p)
: size(p->prefetcher_size), pageStop(!p->prefetch_past_page),
serialSquash(p->prefetch_serial_squash),
cacheCheckPush(p->prefetch_cache_check_push),
onlyData(p->prefetch_data_accesses_only)
{
}
@@ -143,9 +142,6 @@ BasePrefetcher::getPacket()
do {
pkt = *pf.begin();
pf.pop_front();
if (!cacheCheckPush) {
keep_trying = cache->inCache(pkt->getAddr());
}
if (keep_trying) {
DPRINTF(HWPrefetch, "addr 0x%x in cache, skipping\n",
@@ -226,18 +222,6 @@ BasePrefetcher::notify(PacketPtr &pkt, Tick time)
"inserting into prefetch queue with delay %d time %d\n",
addr, *delayIter, time);
// Check if it is already in the cache
if (cacheCheckPush && cache->inCache(addr)) {
DPRINTF(HWPrefetch, "Prefetch addr already in cache\n");
continue;
}
// Check if it is already in the miss_queue
if (cache->inMissQueue(addr)) {
DPRINTF(HWPrefetch, "Prefetch addr already in miss queue\n");
continue;
}
// Check if it is already in the pf buffer
if (inPrefetch(addr) != pf.end()) {
pfBufferHit++;

View File

@@ -68,10 +68,6 @@ class BasePrefetcher
/** Do we remove prefetches with later times than a new miss.*/
bool serialSquash;
/** Do we check if it is in the cache when inserting into buffer,
or removing.*/
bool cacheCheckPush;
/** Do we prefetch on only data reads, or on inst reads as well. */
bool onlyData;