ford: drop caches more granularly#1011
Merged
Merged
Conversation
joemfb
approved these changes
May 13, 2026
joemfb
left a comment
Collaborator
There was a problem hiding this comment.
discussed in the blitz, LGTM.
dozreg-toplud
commented
May 14, 2026
|
|
||
| case c3__drop: { | ||
| u3C.wag_w |= u3o_free_ford; | ||
| u3m_Ford_fresh_road_depth_w = c3_max(u3m_road_depth(), u3m_Ford_fresh_road_depth_w); |
Contributor
Author
There was a problem hiding this comment.
@joemfb I don't think taking maximum is necessary actually: u3m_Ford_fresh_road_depth_w is always less then or equal to the current road depth, so taking the maximum of it and the current road depth is equivalent to just taking the current road depth.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Adds a global variable that tracks the road depth at which the ford cache was freed.
In top-level wrapper set it to zero (might be set to non-zero value by ^C-ing during kernel upgrade).
On
%dropset it to current road depth and free current Ford table.On leaving the road check if the caches are old by comparing the variable against current road depth, freeing the caches if they are old. Note the comment on the operation order.