Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MSHR: fix a dual-core bug when ReleaseData nests the Probe #177

Merged
merged 1 commit into from
May 23, 2024

Conversation

sumailyyc
Copy link
Contributor

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.

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.
@Ivyfeather Ivyfeather merged commit dbba515 into OpenXiangShan:master May 23, 2024
2 checks passed
ruiszhang pushed a commit to ruiszhang/HuanCun that referenced this pull request Jun 28, 2024
…Shan#177)

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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants