[Gems-users] Cache replacement policy


Date: Tue, 31 Oct 2006 13:10:18 +0100
From: Alberto Ros Bardisa <a.ros@xxxxxxxxxxx>
Subject: [Gems-users] Cache replacement policy
Dear Gems Users,

I have a question about the replacement policy used in the CacheMemory
class (ruby/system/CacheMemory.h). A block can be allocated in a cache
set when at least one line has "AccessPermission_NotPresent". In other
case, the cacheProbe function is called to get the address of the block
that will be evicted. This block is the LRU in the set. But what about
the invalidated blocks ("AccessPermission_Invalid")? I think that they
must be replaced earlier than valid blocks (MOES) without take in
consideration the age of the block.

In fact when I run the next trace (all blocks assigned to the same cache
set),

0 0x400 0 LD
0 0x800 0 LD
3 0x800 0 ST
0 0x1200 0 LD

with a two-way L1 cache, the last request causes the replacement in the
L1cache-0 of the block 0x400 (in M state) keeping in cache the block
0x800 (in I state) because is more recent. Does this make sense? Am I
losing something?

Thank you very much!!

Regards

Alberto

[← Prev in Thread] Current Thread [Next in Thread→]