-
Notifications
You must be signed in to change notification settings - Fork 6.2k
8373468: Shenandoah: Mutator may block at _gc_waiters_lock after allocation failure even block parameter is false #28758
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
…ilure even block parameter is false
|
👋 Welcome back xpeng! A progress list of the required criteria for merging this PR into |
|
❗ This change is not yet ready to be integrated. |
|
@pengxiaolong The following labels will be automatically applied to this pull request:
When this pull request is ready to be reviewed, an "RFR" email will be sent to the corresponding mailing lists. If you would like to change these labels, use the /label pull request command. |
Webrevs
|
| ShenandoahSharedFlag _gc_requested; | ||
| GCCause::Cause _requested_gc_cause; | ||
| ShenandoahSharedFlag _gc_requested; | ||
| Atomic<GCCause::Cause> _requested_gc_cause; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
_requested_gc_cause should always be accessed when holding the _control_lock. Making this atomic should not be unnecessary.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, the change to use Atomic for _requested_gc_cause is unnecessary, I have reverted it with a minor change for ShenandoahControlThread to always access _requested_gc_cause with _control_lock held.
|
Can you describe the scenario you are trying to fix here? The two control threads have different idle/wakeup conditions. |
The major thing I am fixing in the PR is to make ShenandoahControlThread always honor the |
There is behavior discrepancy between Shenandoah generational mode and non-generational when it handles mutator allocation failure, as stated in the description of JDK-8373468, in non-generational, the
blockparameter may not always work.Further looking into ShenandoahGenerationalControlThread and ShenandoahControlThread, they handle the _requested_gc_cause and ShenandoahHeap::cancelled_cause differently in other places as well, the change in this PR will minimize the gap to unify the behavior, and also fix potentially missed allocation failure notifications in some rare cases for both control threads.
Test
Progress
Issue
Reviewing
Using
gitCheckout this PR locally:
$ git fetch https://git.openjdk.org/jdk.git pull/28758/head:pull/28758$ git checkout pull/28758Update a local copy of the PR:
$ git checkout pull/28758$ git pull https://git.openjdk.org/jdk.git pull/28758/headUsing Skara CLI tools
Checkout this PR locally:
$ git pr checkout 28758View PR using the GUI difftool:
$ git pr show -t 28758Using diff file
Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/28758.diff
Using Webrev
Link to Webrev Comment