Different cache latency for read and write access
Review Request #2072 - Created Oct. 29, 2013 and discarded
| Information | |
|---|---|
| Sophiane SENNI | |
| gem5 | |
| Reviewers | |
| Default | |
This patch allows specifying different cache latency for read and write access. (In the code, the hit_latency parameter is actually the read_latency)
I used --debug-flags command to check read hit latency and write hit latency for Dcache and Icache. I checked the time between a request sent by the cpu and the response sent by the cache memory.
Review request changed
Updated (Oct. 31, 2013, 2:55 a.m.)
Status: Re-opened
Summary: |
|
|||
|---|---|---|---|---|
Description: |
|
|||
Testing Done: |
|
|||
Diff: |
Revision 2 (+21 -5) |
Review request changed
Updated (Nov. 4, 2013, 1:44 a.m.)
Change Summary:
A mistake made in LRU::accessBlock function. The "lat" parameter has to be passed by reference (not by value). Sorry...
Diff: |
Revision 3 (+19 -3) |
|---|
Posted (Nov. 13, 2013, 6:24 a.m.)
Currently I was also looking into this issue (adding an extra write latency actually). As far as I can see this patch considers a different write latency only for write operations that come from the CPU side, i.e., on the cpuSidePort of the cache. For the patch to be complete, it should consider also a different cache write latency when writes come from the memory side, i.e., on the memSidePort of the cache. Some changes in the following functions may be required (in src/mem/cache/cache_impl.hh): 00858 Cache<TagStore>::recvTimingResp(PacketPtr pkt) ..... 00939 // If critical word (no offset) return first word time. 00940 // responseLatency is the latency of the return path 00941 // from lower level caches/memory to an upper level cache or 00942 // the core. 00943 completion_time = clockEdge(responseLatency) + 00944 (transfer_offset ? pkt->busLastWordDelay : 00945 pkt->busFirstWordDelay); ..... 01211 Cache<TagStore>::handleFill(PacketPtr pkt, BlkType *blk, 01212 PacketList &writebacks) ..... 01270 blk->whenReady = clockEdge() + responseLatency * clockPeriod() + 01271 pkt->busLastWordDelay; Apparently, in the recvTimingResp() function it seems that completion_time is only used for stats, while in handlefill() the actual write (a cache fill from the memory side) in the cache takes place. Note that the fill takes multiple bus cycles, thus, the write latency should take this into account. As a last thing, maybe a new parameter should be added, i.e., writeResponseLatency.
Review request changed
Updated (Jan. 9, 2014, 2:06 a.m.)
Change Summary:
Consider the cache write latency for writes coming from memory side (cache fill)
Diff: |
Revision 4 (+21 -5) |
|---|
Posted (April 9, 2014, 12:44 a.m.)
How can we get this into shape, and how does it align with: http://reviews.gem5.org/r/1822/? Also, if all we do is add latency, how does it affect the throughput (are we assuming pipelining or not)?
