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

Fix multi-set hit in L1 #4

Merged
merged 1 commit into from
Mar 5, 2024
Merged

Fix multi-set hit in L1 #4

merged 1 commit into from
Mar 5, 2024

Conversation

micprog
Copy link
Member

@micprog micprog commented Feb 20, 2024

The serial lookup for the cache can occasionally have multiple hits, which is detrimental to performance. Tracing the issue, this is due to a tag miss occurring in the first cycle, in the following cycle the refill from a previous requester arrives, but the previous miss was not aware of this refill and thus triggers another refill of the same address. This PR fixes this by directly forwarding the refill to the requestor in case of a match, avoiding a second refill.

@nicomar0

Copy link

@paulsc96 paulsc96 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, assuming the refill_wdata_q register for the forwarding is negligible in complexity.

@micprog micprog force-pushed the michaero/serial_l1_multihit branch from f1a82bb to 585be38 Compare February 27, 2024 15:00
@micprog
Copy link
Member Author

micprog commented Feb 28, 2024

LGTM, assuming the refill_wdata_q register for the forwarding is negligible in complexity.

I believe it is a full cache line, so may not be negligible. Merging with another register should be possible, though, although will significantly decrease readability...

Copy link
Member

@SamuelRiedel SamuelRiedel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. The overhead of an entire cache line will not be negligible, but since, in my opinion, this is more of a correctness fix than a performance optimization, I would merge it as is.

@micprog micprog merged commit a3fe8da into main Mar 5, 2024
7 checks passed
@micprog micprog deleted the michaero/serial_l1_multihit branch March 5, 2024 17:05
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.

3 participants