On Tue, 3 Jan 2012, Mahmood Naderan wrote:

refCount is just counting the number of times that block has been
referenced. The lru policy is maintained without making use of refCount.

i can not understand why....
Doesn't "refCount is just counting the number of times that block has
been referenced" represent a Most Recently Used (or Lease Recently
Used) block?

No.



Read the function accessBlock() in lru.cc
From my understandings,

1) a block is found based on set and tag
BlkType *blk = sets[set].findBlk(tag);

2) If the block is found, it is placed on the MRU position:
sets[set].moveToHead(blk);

This line is enforcing the LRU discipline.


3) The next 'if" statement is about timing.

4) incrementing the refCount which shows this block has been accessed
blk->refCount += 1;

5) the block is returned to caller (cache_impl.hh::access())

So where is replacement?

The function accessBlock() does not need to perform any replacement.

--
Nilay
_______________________________________________
gem5-users mailing list
[email protected]
http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users

Reply via email to