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

i#7363: fix exclusive mode cache policy #7398

Merged
merged 4 commits into from
Mar 26, 2025
Merged

Conversation

brettcoon
Copy link
Contributor

Fixes the problem of exclusive mode caches not properly updating state related to cache policies.

The problem was exposed by recent updates to the drcachesim cache policy logic that made policy updates much more explicit. Several situations were identified by inspection in which exclusive caches did not update the policy counters properly.

This update fixes the problem, and adds two new tests to exercise the exclusive cache policy interactions. Also included is a minor error check in get_cache_metric() to help users avoid wasting hours debugging phantom cache problems because they incorrectly expect cache levels to start at zero.

Fixes: #7363

Fixes the problem of exclusive mode caches not properly updating state
related to cache policies.

The problem was exposed by recent updates to the drcachesim cache policy
logic that made policy updates much more explicit.  Several situations
were identified by inspection in which exclusive caches did not update
the policy counters properly.

This update fixes the problem, and adds two new tests to exercise the
exclusive cache policy interactions.  Also included is a minor error
check in get_cache_metric() to help users avoid wasting hours debugging
phantom cache problems because they incorrectly expect cache levels to
start at zero.

Fixes: #7363
@brettcoon brettcoon requested a review from derekbruening March 25, 2025 00:20
@brettcoon brettcoon merged commit ebe485d into master Mar 26, 2025
24 checks passed
@brettcoon brettcoon deleted the i7363-exclusive-policy branch March 26, 2025 21:38
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.

drcachesim exclusive caches don't follow replacement policy state accurately
2 participants