mem: Allocate cache writebacks before new MSHRs
Review Request #2703 - Created March 22, 2015 and submitted
| Information | |
|---|---|
| Andreas Hansson | |
| gem5 | |
| default | |
| Reviewers | |
| Default | |
Changeset 10769:79a9bddce6bf --------------------------- mem: Allocate cache writebacks before new MSHRs This patch changes the order of writeback allocation such that any writebacks resulting from a tag lookup (e.g. for an uncacheable access), are added to the writebuffer before any new MSHR entries are allocated. This ensures that the writebacks logically precedes the new allocations. The patch also changes the uncacheable flush to use proper timed (or atomic) writebacks, as opposed to functional writes.
Can you elaborate a bit on the functional issue for timing mode? I can see where this makes a difference for atomic, but in timing mode arbitration between misses and writebacks is done in getNextMSHR() and isn't based on the order into which things are placed in mshrQueue vs. writeBuffer (except in the case where there are conflicts, which I don't think can happen here, since you wouldn't be writing back block X if you're making room for a request to block X). Is this strictly related to uncacheable accesses? Or is it really just an atomic-mode fix and you're changing the timing code to be consistent?
-
src/mem/cache/cache_impl.hh (Diff revision 1) -
how about just creating a block here (from before this decl to after the loop) to localize the scope of 'writebacks', so we don't have to bother with the assert at the bottom?
-
src/mem/cache/cache_impl.hh (Diff revision 1) -
comment is wrong, we're issuing the writebacks (no write buffer in atomic mode)
-
src/mem/cache/cache_impl.hh (Diff revision 1) -
looks like these were the only uses of writebackVisitor() and invalidateVisitor()... should we get rid of them? TBH I missed when they were introduced.
Description: |
|
|||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Diff: |
Revision 2 (+43 -26) |
Description: |
|
|||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Diff: |
Revision 3 (+50 -52) |
