Skip to content

ford: drop caches more granularly#1011

Merged
pkova merged 3 commits into
developfrom
dozreg/ford-free-granular
May 14, 2026
Merged

ford: drop caches more granularly#1011
pkova merged 3 commits into
developfrom
dozreg/ford-free-granular

Conversation

@dozreg-toplud

Copy link
Copy Markdown
Contributor

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 %drop set 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.

@dozreg-toplud dozreg-toplud requested a review from joemfb May 13, 2026 17:12
@dozreg-toplud dozreg-toplud requested a review from a team as a code owner May 13, 2026 17:12

@joemfb joemfb left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

discussed in the blitz, LGTM.

@pkova pkova merged commit 55d4b83 into develop May 14, 2026
2 checks passed
@pkova pkova deleted the dozreg/ford-free-granular branch May 14, 2026 06:31
Comment thread pkg/noun/nock.c

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);

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

@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.

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