mem: Make caches way aware
Review Request #2963 - Created July 13, 2015 and submitted
| Information | |
|---|---|
| Andreas Hansson | |
| gem5 | |
| default | |
| Reviewers | |
| Default | |
Changeset 10941:2426f93f5274 --------------------------- mem: Make caches way aware This patch makes cache sets aware of the way number. This enables some nice features such as the ablity to restrict way allocation. The implemented mechanism allows to set a maximum way number to be allocated 'k' which must fulfill 0 < k <= N (where N is the number of ways). In the future more sophisticated mechasims can be implemented.
-
src/mem/cache/blk.hh (Diff revision 1) -
Incidentally, I posted a patch yesterday which adds set and way info to a cache block in ruby.
-
src/mem/cache/tags/base_set_assoc.hh (Diff revision 1) -
Why not run this loop to allocAssoc? Is blks[i]->way != i?
-
src/mem/cache/tags/base_set_assoc.cc (Diff revision 1) -
Same comment as above. Why not maintain blks[i]->way = i?
-
src/mem/cache/tags/fa_lru.cc (Diff revision 1) -
assert(set == 0);
Description: |
|
||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Diff: |
Revision 2 (+155 -16) |
Any feedback before pushing this?
-
src/mem/cache/tags/base.hh (Diff revision 2) -
CacheBlk *find...
-
src/mem/cache/tags/base_set_assoc.hh (Diff revision 2) -
CacheBlk *find...
-
src/mem/cache/tags/fa_lru.hh (Diff revision 2) -
CacheBlk *find...
Other than a few minor things it looks good.
-
src/mem/cache/cache_impl.hh (Diff revision 2) -
Aren't we using nullptr now?
-
src/mem/cache/tags/base.hh (Diff revision 2) -
This and the next function seem to violate style rules with regard to curly braces.
-
src/mem/cache/tags/base_set_assoc.hh (Diff revision 2) -
Curly braces for this function and the next should be on a new line.
-
src/mem/cache/tags/fa_lru.hh (Diff revision 2) -
That would actually go against the convention in this header. I'd rather keep it...
Description: |
|
||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Diff: |
Revision 3 (+159 -16) |
