If you are replacing a dirty block, you need to read that block out of the
cache before the new block shows up, so that you have somewhere to put the
new block.  Thus you don't want to wait until the new block shows up (which
is when handleFill() is called) to identify the victim.  This also allows
you to potentially initiate the writeback while still waiting for the miss
response.

Steve

On Fri, Apr 13, 2012 at 3:14 AM, Mahmood Naderan <[email protected]>wrote:

> I noticed that miss and hit count are done in access(). That is fine.
> However what I don't understand is that why *allocateBlock()* is
> called in access()?
>
> If it has a reason, then what is handleFill() ?
>
> Thanks for any suggestion
>
> On 4/12/12, Mahmood Naderan <[email protected]> wrote:
> > Hi
> > There is something vague in cache_impl.hh. There is a access function
> > in timingAccess():
> > bool satisfied = access(pkt, blk, lat, writebacks);
> >
> > This function will call
> > blk = allocateBlock(pkt->getAddr(), writebacks);
> >
> > within that, a victim is selected
> > BlkType *blk = tags->findVictim(addr, writebacks);
> >
> > The question is why a victim is selected on a cache access? Don't we
> > have handleFill()?
> >
> > In another word, when a block is being accessed, we favor only true or
> > false. Selecting a victim for replacement is done in another function
> > which is named handleFill()
> >
> > I think this is redundant action. Can someone clarify that?
> > --
> > // Naderan *Mahmood;
> >
>
>
> --
> --
> // Naderan *Mahmood;
> _______________________________________________
> gem5-users mailing list
> [email protected]
> http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users
>
_______________________________________________
gem5-users mailing list
[email protected]
http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users

Reply via email to