-
Notifications
You must be signed in to change notification settings - Fork 38
JDK-8315479: GenShen: Expand old-gen while selecting collection set during GLOBAL GC #318
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
JDK-8315479: GenShen: Expand old-gen while selecting collection set during GLOBAL GC #318
Conversation
👋 Welcome back kdnilsen! A progress list of the required criteria for merging this PR into |
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.
A couple of minor nits.
@@ -101,31 +125,50 @@ void ShenandoahGlobalHeuristics::choose_global_collection_set(ShenandoahCollecti | |||
for (size_t idx = 0; idx < size; idx++) { | |||
ShenandoahHeapRegion* r = data[idx]._region; | |||
if (cset->is_preselected(r->index())) { | |||
assert(false, "There should be no preselected regions during GLOBAL GC"); |
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.
Slightly more readable:
fatal("There should be no preselected regions during GLOBAL GC");
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.
Thanks. I'll make this change.
if ((new_cset <= max_old_cset) && (r->garbage() > garbage_threshold)) { | ||
add_region = true; | ||
old_cur_cset = new_cset; | ||
} | ||
} else if (r->age() < tenuring_threshold) { | ||
} else { | ||
// r->is_young() && (r->age() < tenuring_threshold) |
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.
assert
?
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'll make this change also.
Though GHA checks have all passed, our internal CI pipelines have encountered a few problems:
This issue is being addressed under separate ticket: https://bugs.openjdk.org/browse/JDK-8315044 |
if ((new_cset <= max_old_cset) && (r->garbage() > garbage_threshold)) { | ||
add_region = true; | ||
old_cur_cset = new_cset; | ||
} | ||
} else if (r->age() < tenuring_threshold) { | ||
} else { | ||
assert(r->is_young() && (r->age() < tenuring_threshold), "DeMorgan\'s law"); |
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.
Not quite DeMorgan's law because r
could be unaffiliated (it isn't supposed to be, of course). Does the straight quote needs to be escaped?
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'm fixing the message here.
@kdnilsen This change now passes all automated pre-integration checks. ℹ️ This project also has non-automated pre-integration requirements. Please see the file CONTRIBUTING.md for details. After integration, the commit message for the final commit will be:
You can use pull request commands such as /summary, /contributor and /issue to adjust it as needed. At the time when this comment was updated there had been 2 new commits pushed to the
Please see this link for an up-to-date comparison between the source branch of this pull request and the ➡️ To integrate this PR with the above commit message to the |
/integrate |
Going to push as commit 33a8085.
Your commit was automatically rebased without conflicts. |
With GenShen, the size of old generation is as small as possible in order to maximize memory available to young gen. This generally allows less frequent (and therefore more efficient) young-gen collections.
Under normal operation (concurrent marking of old followed by a series of mixed evacuations), old-gen is expanded at the end of a previous GC cycle in order to accommodate evacuation of mixed-evacuation candidates.
However, when we do a GLOBAL collection, we need to expand OLD gen during the selection of the collection set, depending on how many old-gen regions are selected to be evacuated during the GC evacuation phase. This PR makes the change.
Progress
Issue
Reviewers
Reviewing
Using
git
Checkout this PR locally:
$ git fetch https://git.openjdk.org/shenandoah.git pull/318/head:pull/318
$ git checkout pull/318
Update a local copy of the PR:
$ git checkout pull/318
$ git pull https://git.openjdk.org/shenandoah.git pull/318/head
Using Skara CLI tools
Checkout this PR locally:
$ git pr checkout 318
View PR using the GUI difftool:
$ git pr show -t 318
Using diff file
Download this PR as a diff file:
https://git.openjdk.org/shenandoah/pull/318.diff
Webrev
Link to Webrev Comment