ok thanks.
What I meant was the the way totalRefs gets updated. Seems that the
answer is "cleanupRefs() " function.


On 1/4/12, biswabandan panda <[email protected]> wrote:
> LRU is not at all related to totalrefs. LRU tracks the least recently and
> least frequently for which u need the total reference. Gem5 correctly
> models the LRU. It tracks most recently used and moving it to head of the
> block. For LRU the total refs doen't matter.
>
> One thing that gem5 doesnot as far as replacement is concerend, it's not
> evicting the invalid lines. In general the policy should try to evict
> invalid lines if any else the LRU block.
>
> On Wed, Jan 4, 2012 at 10:54 PM, Nilay Vaish <[email protected]> wrote:
>
>> On Wed, 4 Jan 2012, Mahmood Naderan wrote:
>>
>>  Why?
>>>>
>>>
>>> Back to my example, I stated:
>>>
>>> init
>>> (b1,0) (b2,0) (b3,0) (b4,0)   and totalRefs=0
>>>
>>> b1 is accessed
>>> (b1,1) (b2,0) (b3,0) (b4,0)
>>>
>>> b3 is accessed
>>> (b3,1) (b1,1) (b2,0) (b4,0)
>>>
>>> b1 is accessed
>>> (b1,2) (b3,1) (b2,0) (b4,0)
>>>
>>> b4 is accessed
>>> (b4,1) (b1,2) (b3,1) (b2,0)
>>>
>>> b2 is accessed
>>> (b2,1) (b4,1) (b1,2) (b3,1)
>>>
>>>
>>> If the above procedure is exactly what is done in gem5, then:
>>>
>>> 1) gem5 return totalRefs=1 because
>>> totalRefs += blk->refCount
>>> totalRefs = 0 + 1 (from b3) = 1
>>>
>>> 2) based on the description, "total number of references to valid
>>> blocks", I think is 5
>>>
>>>
>>>
>>>
>> That's because you are looking at the value of totalRefs while the
>> simulation is running. At the end of the simulation, references for blocks
>> that are in the cache are added to totalRefs.
>>
>>
>> --
>> Nilay
>> ______________________________**_________________
>> gem5-users mailing list
>> [email protected]
>> http://m5sim.org/cgi-bin/**mailman/listinfo/gem5-users<http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users>
>>
>
>
>
> --
>
> *thanks&regards
> *
> *BISWABANDAN*
>


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

Reply via email to