Skip to content

Don't pin objects permanently in ast.c #90

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

Merged
merged 4 commits into from
Jun 21, 2025

Conversation

d-netto
Copy link
Collaborator

@d-netto d-netto commented Jun 17, 2025

jl_value_t*s passed to julia_to_scm_ will now be pushed into a per-AST-context vector and pinned/unpinned at the end of GC.

The per-AST-context vector of pinned objects is reset when we de-allocate its corresponding AST context.

@d-netto d-netto marked this pull request as draft June 17, 2025 17:30
@d-netto d-netto force-pushed the dcn-optimize-pinning-in-ast branch from b67cb36 to 1dc1459 Compare June 19, 2025 22:25
@d-netto d-netto changed the title WIP: Don't pin objects permanently in ast.c Don't pin objects permanently in ast.c Jun 20, 2025
@d-netto d-netto marked this pull request as ready for review June 20, 2025 01:25
@d-netto d-netto requested review from qinsoon and udesou June 20, 2025 03:18
Copy link
Member

@qinsoon qinsoon left a comment

Choose a reason for hiding this comment

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

LGTM. Nice refactoring.

Did you run the evaluation again with this PR? I am just interested to get an idea of what we would expect from this PR on the benchmark.

@d-netto
Copy link
Collaborator Author

d-netto commented Jun 21, 2025

I did.

I shared a fragmentation time-series and a pinning profile on Slack, but the conclusion is that, with this PR, our fragmentation is still around 100MB, but we no longer have pins coming from OBJ_PIN and OBJHASH_PIN in the inference benchmark.

@d-netto d-netto merged commit a3d4e39 into mmtk-support-moving-upstream Jun 21, 2025
6 checks passed
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