> On June 22, 2015, 4:57 a.m., Nilay Vaish wrote:
> > src/mem/abstract_mem.cc, line 340
> > <http://reviews.gem5.org/r/2882/diff/1/?file=46237#file46237line340>
> >
> >     Are you moving this because size of the packet would be zero for clean 
> > evicts?

Indeed. We are simply checking for the transactions that should be sunk with no 
further action before checking the size.


> On June 22, 2015, 4:57 a.m., Nilay Vaish wrote:
> > src/mem/cache/cache_impl.hh, lines 354-361
> > <http://reviews.gem5.org/r/2882/diff/1/?file=46239#file46239line354>
> >
> >     I am surprised by this comment over here.  It implies that the cache is 
> > dependent on the interconnect behaving in a certain fashion.  Why not keep 
> > a count of the caches who have the block?

There are already some rather fundamental assumptions on the interconnect and 
its interaction with the caches. Most importantly, the design is in line with 
how the caches and interconnect work today.

We did actually consider the option of counting when this work started, but it 
is far from straight forward, and far more invasive on the caches and 
interconnect. Remember that the classic memory system already uses 
"communication by pointers" where the same packet pointer is passed to multiple 
agents, and the communication between them takes place not only by 
requests/responses, but also by changing properties of the _shared_ packet 
pointer. If we really want to keep track of counters we need to fundamentally 
change how this works and ensure that we always return responses.

In short, I would suggest we go ahead with the current design.


> On June 22, 2015, 4:57 a.m., Nilay Vaish wrote:
> > src/mem/coherent_xbar.cc, lines 141-146
> > <http://reviews.gem5.org/r/2882/diff/1/?file=46242#file46242line141>
> >
> >     Can you explain the issue you are referring to?

This (rather unfortunate) design pattern is used in quite a few places to 
overcome the issue that we only have two transaction phases, and thus do not 
actually know when a request/response is finished and can safely be deleted.

For example, a sender calls sendTimingReq with a packet that does not require a 
response, and the receiver is now responsible for deleting it. If we call 
delete in recvTimingReq we now have an issue, because the packet pointer is 
still potentially being used by the sender. We need to delete it _after_ the 
call to sendTimingReq is finished. Hence the hack.


> On June 22, 2015, 4:57 a.m., Nilay Vaish wrote:
> > src/mem/coherent_xbar.cc, line 218
> > <http://reviews.gem5.org/r/2882/diff/1/?file=46242#file46242line218>
> >
> >     Should not this comment also move down?

Good point. Fixed now.


> On June 22, 2015, 4:57 a.m., Nilay Vaish wrote:
> > src/mem/packet.hh, line 90
> > <http://reviews.gem5.org/r/2882/diff/1/?file=46244#file46244line90>
> >
> >     Instead of checking cmd == CleanEvict, should we not have a function 
> > isCleanEvict() like we have for other commands?

We do not have functions for the other commands. We have functions for the 
properties/flags of these commands. I hope that makes sense?


> On June 22, 2015, 4:57 a.m., Nilay Vaish wrote:
> > src/mem/packet.cc, line 90
> > <http://reviews.gem5.org/r/2882/diff/1/?file=46245#file46245line90>
> >
> >     Why CleaEvict is a write request?

Any other suggestions? It is essentiallly a writeback without any data, and it 
lives in the writeback queue in the cache, just like writebacks.


> On June 22, 2015, 4:57 a.m., Nilay Vaish wrote:
> > src/mem/snoop_filter.cc, line 185
> > <http://reviews.gem5.org/r/2882/diff/1/?file=46246#file46246line185>
> >
> >     Is the following check better: 
> >     
> >     assert((cpkt->cmd == MemCmd::Writeback ||
> >                cpkt->isInvalidate()) == cpkt->needsExclusive());

I do not really understand the suggestion or how it would help making things 
clearer.

The test is indeded to say: "make sure this is a writeback OR that the 
invalidation flag matches the need for exclusivity"


- Andreas


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://reviews.gem5.org/r/2882/#review6544
-----------------------------------------------------------


On June 10, 2015, 7:59 a.m., Andreas Hansson wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://reviews.gem5.org/r/2882/
> -----------------------------------------------------------
> 
> (Updated June 10, 2015, 7:59 a.m.)
> 
> 
> Review request for Default.
> 
> 
> Repository: gem5
> 
> 
> Description
> -------
> 
> Changeset 10873:1ca942c89bd6
> ---------------------------
> mem: Add clean evicts and overloaded writebacks
> 
> This patch adds eviction notices to the caches, to provide accurate
> tracking of cache blocks in snoop filters. We add the CleanEvict
> message to the memory heirarchy and use both CleanEvicts and
> Writebacks with BLOCK_CACHED flags to propagate notice of clean and
> dirty evictions respectively, down the memory hierarchy. Note that the
> BLOCK_CACHED flag indicates whether there exist any copies of the
> evicted block in the caches above the evicting cache.
> 
> The purpose of the CleanEvict message is to notify snoop filters of
> silent evictions in the relevant caches. The CleanEvict message
> behaves much like a Writeback. CleanEvict is a write and a request but
> unlike a Writeback, CleanEvict does not have data and does not need
> exclusive access to the block. The cache generates the CleanEvict
> message on a fill resulting in eviction of a clean block. Before
> travelling downwards CleanEvict requests generate zero-time snoop
> requests to check if the same block is cached in upper levels of the
> memory heirarchy. If the block exists, the cache discards the
> CleanEvict message. The snoops check the tags, writeback queue and the
> MSHRs of upper level caches in a manner similar to snoops generated
> from HardPFReqs. Currently CleanEvicts keep travelling towards main
> memory unless they encounter the block corresponding to their address
> or reach main memory (since we have no well defined point of
> serialisation). Main memory simply discards CleanEvict messages.
> 
> We have modified the behavior of Writebacks, such that they generate
> snoops to check for the presence of blocks in upper level caches. It
> is possible in our current implmentation for a lower level cache to be
> writing back a block while a shared copy of the same block exists in
> the upper level cache. If the snoops find the same block in upper
> level caches, we set the BLOCK_CACHED flag in the Writeback message.
> 
> We have also added logic to account for interaction of other message
> types with CleanEvicts waiting in the writeback queue. A simple
> example is of a response arriving at a cache removing any CleanEvicts
> to the same address from the cache's writeback queue.
> 
> 
> Diffs
> -----
> 
>   src/mem/cache/cache_impl.hh ebb3d0737aa7 
>   src/mem/cache/prefetch/base.cc ebb3d0737aa7 
>   src/mem/coherent_xbar.hh ebb3d0737aa7 
>   src/mem/coherent_xbar.cc ebb3d0737aa7 
>   src/mem/dram_ctrl.cc ebb3d0737aa7 
>   src/mem/packet.hh ebb3d0737aa7 
>   src/mem/packet.cc ebb3d0737aa7 
>   src/mem/snoop_filter.cc ebb3d0737aa7 
>   src/mem/abstract_mem.cc ebb3d0737aa7 
>   src/mem/cache/cache.hh ebb3d0737aa7 
> 
> Diff: http://reviews.gem5.org/r/2882/diff/
> 
> 
> Testing
> -------
> 
> 
> Thanks,
> 
> Andreas Hansson
> 
>

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

Reply via email to