mem: Clarify cache MSHR handling on fill
Review Request #3151 - Created Oct. 13, 2015 and submitted
Information | |
---|---|
Andreas Hansson | |
gem5 | |
default | |
Reviewers | |
Default | |
Changeset 11174:dd9708ed6940 --------------------------- mem: Clarify cache MSHR handling on fill This patch addresses the upgrading of deferred targets in the MSHR, and makes it clearer by explicitly calling out what is happening (deferred targets are promoted if we get exclusivity without asking for it).
-
src/mem/cache/cache.cc (Diff revision 1) -
Why do you need to call it again? You already called it once above.
-
src/mem/cache/mshr.hh (Diff revision 1) -
Can you quailify this packet as const?
Description: |
|
|||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Diff: |
Revision 2 (+8 -7) |
Ship It!
The original idea was to provide the MSHR a general hook to influence protocol actions; since this one action of promoting targets on an unexpected exclusive block is the only thing that materialized, it's fine with me to un-generalize it for clarity. However, if we're going to do that, then we don't need to pass the packet in either, as long as we do the exclusive check outside the call, as shown below.
-
src/mem/cache/cache.cc (Diff revision 2) -
if (!pkt->sharedAsserted())
mshr->promoteDeferred(); -
src/mem/cache/mshr.cc (Diff revision 2) -
if (hasPostInvalidate() || hasPostDowngrade()
|| deferredTargets.needsExclusive)
return;[...]
Description: |
|
|||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Diff: |
Revision 3 (+14 -11) |
Thanks!