Skip to content

Allow configuring each Immix space to be non moving #1305

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
Apr 30, 2025

Conversation

qinsoon
Copy link
Member

@qinsoon qinsoon commented Apr 17, 2025

We plan to use non-moving Immix as a non-moving space. In this case, we will have two Immix spaces, one allows moving, and the other does not. We currently use global constants to control whether Immix moves objects or not, and we cannot have two Immix spaces that are configured differently.

This PR removes those constants, and adds a flag never_move_objects in ImmixSpaceArgs to indicate whether this Immix space disallows moving.

@qinsoon qinsoon force-pushed the immix-nonmoving-instance branch from 61d26db to a965bb8 Compare April 22, 2025 04:08
@qinsoon qinsoon force-pushed the immix-nonmoving-instance branch from a965bb8 to 530d80c Compare April 22, 2025 04:21
@qinsoon qinsoon marked this pull request as ready for review April 23, 2025 00:07
@qinsoon qinsoon requested a review from wks April 23, 2025 00:07
@qinsoon qinsoon force-pushed the immix-nonmoving-instance branch from 804f43b to cf726b4 Compare April 24, 2025 05:25
@qinsoon qinsoon force-pushed the immix-nonmoving-instance branch from cf726b4 to 2ecb7a3 Compare April 24, 2025 06:01
@qinsoon
Copy link
Member Author

qinsoon commented Apr 28, 2025

The following is the performance evaluation of this PR. The PR has no measurable impact on performance.

Immix
nonmoving-ix

StickyImmix
nonmoving-stickyix

GenImmix
nonmoving-genix

@qinsoon
Copy link
Member Author

qinsoon commented Apr 28, 2025

@wks I have addressed your comments, and posted performance results for the PR. Can you review it again?

wks
wks previously approved these changes Apr 28, 2025
Copy link
Collaborator

@wks wks left a comment

Choose a reason for hiding this comment

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

LGTM

@wks wks dismissed their stale review April 28, 2025 02:30

Sorry. There are some issues with PlanConstraints::moves_objects. I'll comment later.

Copy link
Collaborator

@wks wks left a comment

Choose a reason for hiding this comment

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

One minor issue is that PlanConstraints::moves_objects may conditionally be true if some Cargo features are enabled.

From one hand, we may leave it as true so that the VM will conservatively consider Immix and StickyImmix are moving plans. This is OK for testing object copying on VMs that plans to supported copying GC.

But I think there may be some VMs that intentionally only supports non-copying GCs. They can reject any plans labelled with PlanConstrant::moves_objects == false. In this case, those VM bindings will always enable immix_non_moving and sticky_immix_non_moving_nursery and expect Immix and StickyImmix to have PlanConstrant::moves_objects == true. I am not sure how the performance may be (because of fragmentation), but I think setting PlanConstrant::moves_objects accurately could be helpful.

Copy link
Collaborator

@wks wks left a comment

Choose a reason for hiding this comment

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

LGTM

@qinsoon qinsoon added this pull request to the merge queue Apr 30, 2025
Merged via the queue into mmtk:master with commit 5c1c8b1 Apr 30, 2025
33 checks passed
@qinsoon qinsoon deleted the immix-nonmoving-instance branch April 30, 2025 01:34
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