On Tue, January 3, 2012 1:14 am, Mahmood Naderan wrote:
> Hi,
> If you look at findVictim(), you can see that a block is selected
> (with set number) and no matter what is the refCount (I think this is
> LRU counter), the block is selected as victim.

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

>
>     BlkType *blk = sets[set].blks[assoc-1];
>     if (blk->isValid()) {
>         replacements[0]++;
>         totalRefs += blk->refCount;
>         ++sampledRefs;
>         blk->refCount = 0;
>         .....
>         DPRINTF(CacheRepl, "set %x: selecting blk %x for replacement\n",
>                 set, regenerateBlkAddr(blk->tag, set));
>     }
>     return blk;
>
> As far as I know, in LRU policy, after finding the set number, all
> counters in the ways are compared to find the minimum one. That is
> actually show the least referenced way.

The block that has been referenced the least number of times is not
necessarily the LRU block. Read the function accessBlock() in lru.cc to
figure out how the LRU policy is being enforced.

>
> Can someone clarify that?
> --
> // Naderan *Mahmood;
> _______________________________________________
> gem5-users mailing list
> [email protected]
> http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users
>


--
Nilay

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

Reply via email to