-
Notifications
You must be signed in to change notification settings - Fork 36
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
8338737: Shenandoah: Reset marking bitmaps after the cycle #516
base: master
Are you sure you want to change the base?
Conversation
…ate it for global generation
👋 Welcome back xpeng! A progress list of the required criteria for merging this PR into |
❗ This change is not yet ready to be integrated. |
Webrevs
|
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.
I have some concerns about the correctness here. Consider this scenario:
- At the end of a young or mixed collection,
op_reset_after_collect
will reset young regions and unset theneeds reset
flag for the young generation. - An old region (A) from the mixed collection could be repurposed as a young region (it's bitmap will not be reset when it is recycled).
- The next young/mixed collection will not reset the bitmap for region A because the
needs reset
flag is clear. - The collector will see stale mark bits for region A and will probably crash.
My understanding is: op_reset_after_collect is called at the end of a successful collection after the old region (A) is repurposed as a young region, if so it is not an issue, I'll double confirm. |
op_reset_after_collect also reset the regions are not affiliated, after a mixed/young collection, the old region should have been recycled before resetting bitmaps, so even the recycled old region is repurposed as young region later, it should be ok. If the young/mixed_ collection is set to bootstrap old GC, the reset of bitmaps is delayed to old GC to avoid dirty bitmaps |
By repeatedly running test gc/stress/gcold/TestGCOldWithShenandoah.java#generational many times, I could produce a crash, not sure root cause yet, but this might be the root cause. |
It is not a crash, looks like it is not related, I'll run test w/o the change to verify:
|
I have run
|
My change also has stale mark bits issue I believe, gitfarm Genshen test fails sometimes due to crash caused by stale bitmap marks. Amended one fix in this PR, it should solve the issue: d4fddac#diff-7b87cde2e13d8769dc21cf6f7ae45c92942776fcb44275339182b7fa5c290ce0 I have run TestGCOldWithShenandoah.java#generational 100 times w/o crash caused by stale bitmap marks last night. |
…gion from OLD_GENERATION" This reverts commit d4fddac.
All the shenandoah passed, still waiting for our test farm to verify performance.
Reset marking bitmaps after collection cycle, for GenShen only do this for young generation, also choose not do this for Degen and full GC since both are running at safepoint, we should leave safepoint as ASAP.
I have run same workload for 30s with shenandoah in generational mode and classic mode, average average time of concurrent reset dropped significantly(283us to 109us for GenShen, 276us to 167us for classic shenandoah.
Classic shenandoah baseline:
Classic shenandoah reset bitmaps after cycle:
GenShen baseline
GenShen reset bitmaps after cycle
Throughput is also improved by ~21% if use the GC counts as proxy metrics.
Progress
Issue
Reviewing
Using
git
Checkout this PR locally:
$ git fetch https://git.openjdk.org/shenandoah.git pull/516/head:pull/516
$ git checkout pull/516
Update a local copy of the PR:
$ git checkout pull/516
$ git pull https://git.openjdk.org/shenandoah.git pull/516/head
Using Skara CLI tools
Checkout this PR locally:
$ git pr checkout 516
View PR using the GUI difftool:
$ git pr show -t 516
Using diff file
Download this PR as a diff file:
https://git.openjdk.org/shenandoah/pull/516.diff
Using Webrev
Link to Webrev Comment