MSHR: fix a dual-core bug when ReleaseData nests the Probe #177
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Before this commit, an error scenario was discovered during dual-core TL-test: one client L2 requested the T permission for a block, triggering a probe to another L2. At the same time, the other L2 sent a Release request for the same block. L3 would then process the ReleaseData first by saving it in dataStorage, followed by receiving a probeack without data. At this point, L3 would assume the upper-level cache did not have the block, leading to a AcquireBlock request for the data block from memory, resulting in stale data being granted to L2.
This commit fixes the bug by adding conditional constraints to some of the state transitions in L3. Two key signals were added:
nestC_save
indicates that an AcquireBlock is nested by a ReleaseData for the same address, and this ReleaseData has saved into L3.nestC_saveDirty
indicates that nestC_save is satisfied and the ReleaseData is a dirty block.