-
Notifications
You must be signed in to change notification settings - Fork 78
Change the semantics of OverCommit to allow polling #1382
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
base: master
Are you sure you want to change the base?
Conversation
This is useful if the VM cannot trigger GC at most of its allocation sites. If allocation over-commits while still triggering GC, the GC thread can pause the mutators at the nearest safepoints.
We discussed this PR. The enum
|
|
Yes. I think it is a good idea to use boolean options. After a second thought, I think the option can include three independent question:
Specifically, we don't ask whether we "immediately schedule a GC" or "schedule a GC later" because The concrete decision tree will involve all of the three questions above, but the control flow will be complicated. I think it is better to base the change on the following refactoring: This changes the control flow into a straight line style, and it should be easier to inject the three questions at appropriate points of the control flow. I'll have another look at #1381 and get it merged first. That PR doesn't change the overall semantics except for fixing some obvious bugs. |
Like #1380, but we remove the old OverCommit, and change the semantics of OverCommit to that of RequestAndOverCommit.
By doing this, the OnAllocationFail will no longer prevent polling from happening.