From 740984b30be923e0c171a52fe357a05016fe08c0 Mon Sep 17 00:00:00 2001 From: Nilay Vaish Date: Sat, 5 Sep 2015 09:35:39 -0500 Subject: ruby: call setMRU from L1 controllers, not from sequencer Currently the sequencer calls the function setMRU that updates the replacement policy structures with the first level caches. While functionally this is correct, the problem is that this requires calling findTagInSet() which is an expensive function. This patch removes the calls to setMRU from the sequencer. All controllers should now update the replacement policy on their own. The set and the way index for a given cache entry can be found within the AbstractCacheEntry structure. Use these indicies to update the replacement policy structures. --- src/mem/ruby/structures/CacheMemory.hh | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/mem/ruby/structures/CacheMemory.hh') diff --git a/src/mem/ruby/structures/CacheMemory.hh b/src/mem/ruby/structures/CacheMemory.hh index 1af446950..7ce674e61 100644 --- a/src/mem/ruby/structures/CacheMemory.hh +++ b/src/mem/ruby/structures/CacheMemory.hh @@ -106,6 +106,8 @@ class CacheMemory : public SimObject // Set this address to most recently used void setMRU(Addr address); + // Set this entry to most recently used + void setMRU(const AbstractCacheEntry *e); // Functions for locking and unlocking cache lines corresponding to the // provided address. These are required for supporting atomic memory -- cgit v1.2.3