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

Discontiguous MarkCompactSpace support #930

Closed
wenyuzhao opened this issue Aug 31, 2023 · 2 comments · Fixed by #939
Closed

Discontiguous MarkCompactSpace support #930

wenyuzhao opened this issue Aug 31, 2023 · 2 comments · Fixed by #939

Comments

@wenyuzhao
Copy link
Member

Currently, the MarkComapctSpace relies on self.common.start, which is only set for contiguous spaces: https://github.com/mmtk/mmtk-core/blob/master/src/policy/markcompactspace.rs#L322

This brings an implicit assumption that the MarkCompactSpace can work correctly only when being configured as contiguous. Although it's constructor actually supports discontiguous layout https://github.com/mmtk/mmtk-core/blob/master/src/policy/markcompactspace.rs#L202-L206.

This is a blocker for the openjdk compressed oops support, as it will enable discontiguous MarkCompactSpace for MarkCompact plan.

@wks
Copy link
Collaborator

wks commented Aug 31, 2023

If I read the code of MonotonicPageResource correctly, it chains up all the "contiguous chunks" in a doubly linked list, with CommonPageResource::head_discontiguous_region pointing to the last "contiguous chunks" obtained from Map32. We can follow this linked list and fill up each "contiguous chunks" when computing forwarding pointers.

@wenyuzhao
Copy link
Member Author

If I read the code of MonotonicPageResource correctly, it chains up all the "contiguous chunks" in a doubly linked list, with CommonPageResource::head_discontiguous_region pointing to the last "contiguous chunks" obtained from Map32. We can follow this linked list and fill up each "contiguous chunks" when computing forwarding pointers.

Yeah I'll try to use this to fix it. I did this on Java MMTk before.

github-merge-queue bot pushed a commit that referenced this issue Sep 5, 2023
This PR adds discontiguous heap support for mark compact GC, and
rewrites the forwarding pointer calculation and compaction code to be
compactable to both contiguous and discontiguous spaces.

Fixes #930
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
Status: Done
Development

Successfully merging a pull request may close this issue.

2 participants