mem: Split the hit_latency into tag_latency and data_latency
Review Request #3502 - Created June 15, 2016 and submitted
| Information | |
|---|---|
| Sophiane SENNI | |
| gem5 | |
| default | |
| Reviewers | |
| Default | |
Changeset 11688:1a792798e845
---------------------------
mem: Split the hit_latency into tag_latency and data_latencyIf the cache access mode is parallel, i.e. "sequential_access" parameter
is set to "False", tags and data are accessed in parallel. Therefore,
the hit_latency is the maximum latency between tag_latency and
data_latency. On the other hand, if the cache access mode is
sequential, i.e. "sequential_access" parameter is set to "True",
tags and data are accessed sequentially. Therefore, the hit_latency
is the sum of tag_latency plus data_latency.
Tested using --Debug-flags=Cache
Summary: |
|
||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Description: |
|
||||||||||||||||||
Branch: |
|
||||||||||||||||||
Diff: |
Revision 2 (+65 -18) |
Description: |
|
|---|
Hi Sophiane,
Thanks for the contribution. It looks like some of the patch doesn't apply cleanly in reviewboard. Did you use the hg postreview extension? It may also help to use the "-o" option on the extension.
Cheers!
Description: |
|
||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Diff: |
Revision 4 (+65 -18) |
Description: |
|
||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Diff: |
Revision 7 (+65 -19) |
I don't like the variable names, I think it's confusing especially in the Python part which is the user part. "lookup_latency" does not clearly refer to the tag lookup action , and "ram_latency" is also not very clear. Maybe something like "tag_latency" and "line_latency" could be better ? I think the two parts of a cache are well identified in this example.
-
src/mem/cache/tags/base.cc (Diff revision 7) -
more than 80 chars in the line
-
src/mem/cache/tags/base_set_assoc.hh (Diff revision 7) -
Bad white spaces around here.
-
src/mem/cache/tags/fa_lru.cc (Diff revision 7) -
Indentation is is off.
Change Summary:
New variable names in Caches.py : tag_latency and data_latency
Summary: |
|
|||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Description: |
|
|||||||||||||||||||||
Diff: |
Revision 8 (+65 -18) |
Thanks for contributing this. Could you please change the commit message such that the summary (first line) is no more than 65 characters and the body no more than 75 characters. The commit summary should start with the mem keyword.
-
src/mem/cache/tags/base_set_assoc.hh (Diff revision 8) -
Would it make sense to move most of this code in the constructor? The flag sequentialAccess and the condition lookupLatency >= dataLantency shouldn't change during the simulation.
-
src/mem/cache/tags/fa_lru.cc (Diff revision 8) -
Same here
Just some some minor style issues.
-
src/mem/cache/tags/base_set_assoc.hh (Diff revision 8) -
spurious new line
-
src/mem/cache/tags/base_set_assoc.hh (Diff revision 8) -
Spurious new line
-
src/mem/cache/tags/base_set_assoc.hh (Diff revision 8) -
Please wrap the comment such it does not violate the 79 char per line limit
-
src/mem/cache/tags/fa_lru.cc (Diff revision 8) -
Please wrap the comment such it does not violate the 79 char per line limit
-
src/mem/cache/tags/fa_lru.cc (Diff revision 8) -
spurious new line
-
src/mem/cache/tags/fa_lru.cc (Diff revision 8) -
spurious new line
-
src/mem/cache/tags/fa_lru.cc (Diff revision 8) -
Please wrap the comment such it does not violate the 79 char per line limit
Summary: |
|
|||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Description: |
|
|||||||||||||||||||||
Diff: |
Revision 9 (+64 -18) |
Sorry, that was probably unclear from my comment but the commit message body should be wrapped such that no line is more than 75 characters rather than the whole body being limited to 76 char.
Description: |
|
||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Diff: |
Revision 10 (+64 -18) |
Thanks for all the effort you've put into this. Please make this last set of changes and it should be good to go.
-
src/mem/cache/tags/Tags.py (Diff revision 11) -
This stale argument causes the problems you're facing please remove it, I don't think it is needed
-
src/mem/cache/tags/base.cc (Diff revision 11) -
Please remove the comment here. If you would like move the comment in the header to explain what the access latency is.
-
src/mem/cache/tags/base.cc (Diff revision 11) -
no need for parenthesis here
-
src/mem/cache/tags/base.cc (Diff revision 11) -
you don't need the parenthesis here over
Ship It!
Ship It!
-
src/mem/cache/tags/Tags.py (Diff revision 12) -
Why would the tags care about the data latency?
-
src/mem/cache/tags/base.hh (Diff revision 12) -
Seems odd that the tags need to track this. Is this still the best division? Perhaps explain why it's here.
-
src/mem/cache/tags/base_set_assoc.hh (Diff revision 12) -
Could you add a comment here?
It seems to me this code is not right, as it checks if the data is technically written now, but we only need the data at time T.
Should we not rather add the dataLatency to the blk->whenReady and then do the plus or max opteration?
-
src/mem/cache/tags/fa_lru.cc (Diff revision 12) -
here we don't care about blk->whenReady?
Some minor concerns that hopefully make sense.
Hi, Someone can commit this patch ? I don't have right access on the repository, either Sophiane. Thank you.
Description: |
|
||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Diff: |
Revision 14 (+73 -28) |
Description: |
|
||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Diff: |
Revision 15 (+86 -29) |
-
src/mem/cache/tags/base_set_assoc.hh (Diff revision 15) -
If you don't mind changing it, could we keep the operator on the first line?
The same goes for the condition in the if statement.
I am not sure if this is actually captured in the style, but it is definitley convention.
The same goes for the copy in FA-LRU
Thanks!
Description: |
|
||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Diff: |
Revision 16 (+89 -32) |
thanks for getting this in shape
