Skip to content

Conversation

@albertnetymk
Copy link
Member

@albertnetymk albertnetymk commented Dec 5, 2024

This patch reverts the default value of OldSize to its previous setting prior to being obsoleted in JDK-8333962. The change addresses an issue where OldSize being set to zero results in a default MinHeapSize that is too small to handle LargePages correctly. This problem is exemplified by ParallelArguments::initialize_heap_flags_and_sizes, as identified in JDK-8345323.

Changing the default value of OldSize may have broader implications due to the complexity of the logic that determines default values for various flags. Altering one default can lead to cascading effects and potential breakages elsewhere. For these reasons, this patch restores the previous default value of OldSize to mitigate such risks.


Progress

  • Change must be properly reviewed (1 review required, with at least 1 Reviewer)
  • Change must not contain extraneous whitespace
  • Commit message must refer to an issue

Issue

  • JDK-8345323: Parallel GC does not handle UseLargePages and UseNUMA gracefully (Bug - P3)(⚠️ The fixVersion in this issue is [24] but the fixVersion in .jcheck/conf is 25, a new backport will be created when this pr is integrated.)

Reviewers

Reviewing

Using git

Checkout this PR locally:
$ git fetch https://git.openjdk.org/jdk.git pull/22575/head:pull/22575
$ git checkout pull/22575

Update a local copy of the PR:
$ git checkout pull/22575
$ git pull https://git.openjdk.org/jdk.git pull/22575/head

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 22575

View PR using the GUI difftool:
$ git pr show -t 22575

Using diff file

Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/22575.diff

Using Webrev

Link to Webrev Comment

@bridgekeeper
Copy link

bridgekeeper bot commented Dec 5, 2024

👋 Welcome back ayang! A progress list of the required criteria for merging this PR into master will be added to the body of your pull request. There are additional pull request commands available for use with this pull request.

@openjdk
Copy link

openjdk bot commented Dec 5, 2024

@albertnetymk 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:

8345323: Parallel GC does not handle UseLargePages and UseNUMA gracefully

Reviewed-by: sjohanss, tschatzl

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 157 new commits pushed to the master branch:

  • 367c304: 8346059: [ASAN] awt_LoadLibrary.c reported compile warning ignoring return value of function by clang17
  • 31ceec7: 8346055: javax/swing/text/StyledEditorKit/4506788/bug4506788.java fails in ubuntu22.04
  • 09c29d1: 8346069: Add missing Classpath exception statements
  • 28e49e9: 8345505: Fix -Wzero-as-null-pointer-constant warnings in zero code
  • db9eab3: 8311542: Consolidate the native stack printing code
  • 18e0b34: 8344137: Update XML Security for Java to 3.0.5
  • e9ad27f: 8339313: 32-bit build broken
  • ff85865: 8346008: Fix recent NULL usage backsliding in Shenandoah
  • 11cd639: 8345573: Module dependencies not resolved from run-time image when --limit-module is being used
  • 22845a7: 8337995: ZUtils::fill uses std::fill_n
  • ... and 147 more: https://git.openjdk.org/jdk/compare/16ef6e2a187181f49b7b2d601c660bbd25ab3845...master

As there are no conflicts, your changes will automatically be rebased on top of these commits when integrating. If you prefer to avoid this automatic rebasing, please check the documentation for the /integrate command for further details.

➡️ To integrate this PR with the above commit message to the master branch, type /integrate in a new comment.

@openjdk openjdk bot changed the title 8345323 8345323: Parallel GC does not handle UseLargePages and UseNUMA gracefully Dec 5, 2024
@openjdk openjdk bot added the rfr Pull request is ready for review label Dec 5, 2024
@openjdk
Copy link

openjdk bot commented Dec 5, 2024

@albertnetymk The following label will be automatically applied to this pull request:

  • hotspot-gc

When this pull request is ready to be reviewed, an "RFR" email will be sent to the corresponding mailing list. If you would like to change these labels, use the /label pull request command.

@openjdk openjdk bot added the hotspot-gc hotspot-gc-dev@openjdk.org label Dec 5, 2024
@mlbridge
Copy link

mlbridge bot commented Dec 5, 2024

Webrevs

Copy link
Contributor

@kstefanj kstefanj left a comment

Choose a reason for hiding this comment

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

Looks good, thanks for doing the fix.

Just a small comment on the comment.

@openjdk openjdk bot added the ready Pull request is ready to be integrated label Dec 9, 2024
Co-authored-by: Stefan Johansson <54407259+kstefanj@users.noreply.github.com>
@openjdk openjdk bot removed the ready Pull request is ready to be integrated label Dec 9, 2024
Comment on lines 40 to 43
// If InitialHeapSize or MinHeapSize is not set on cmdline, this variable,
// together with NewSize, is used to derive them.
// Using the same value when it was a configurable flag to avoid breakage.
// See more in JDK-8345323
Copy link
Contributor

Choose a reason for hiding this comment

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

I do not like referrals to the bug tracker in the code, and/or referring to some code the past ("when it was configurable").
Better explicitly state the problem with heap sizing and large pages and file a follow-up RFE (not mentioning it here).

Copy link
Contributor

Choose a reason for hiding this comment

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

I.e. something like "If the default value of OldSize is too small, then ..., leading to the generations not aligned and not being able to allocate large pages" or so.

@openjdk openjdk bot added the ready Pull request is ready to be integrated label Dec 12, 2024
Copy link
Contributor

@tschatzl tschatzl left a comment

Choose a reason for hiding this comment

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

lgtm

@albertnetymk
Copy link
Member Author

Thanks for review.

/integrate

@openjdk
Copy link

openjdk bot commented Dec 13, 2024

Going to push as commit a9a5f7c.
Since your change was applied there have been 157 commits pushed to the master branch:

  • 367c304: 8346059: [ASAN] awt_LoadLibrary.c reported compile warning ignoring return value of function by clang17
  • 31ceec7: 8346055: javax/swing/text/StyledEditorKit/4506788/bug4506788.java fails in ubuntu22.04
  • 09c29d1: 8346069: Add missing Classpath exception statements
  • 28e49e9: 8345505: Fix -Wzero-as-null-pointer-constant warnings in zero code
  • db9eab3: 8311542: Consolidate the native stack printing code
  • 18e0b34: 8344137: Update XML Security for Java to 3.0.5
  • e9ad27f: 8339313: 32-bit build broken
  • ff85865: 8346008: Fix recent NULL usage backsliding in Shenandoah
  • 11cd639: 8345573: Module dependencies not resolved from run-time image when --limit-module is being used
  • 22845a7: 8337995: ZUtils::fill uses std::fill_n
  • ... and 147 more: https://git.openjdk.org/jdk/compare/16ef6e2a187181f49b7b2d601c660bbd25ab3845...master

Your commit was automatically rebased without conflicts.

@openjdk openjdk bot added the integrated Pull request has been integrated label Dec 13, 2024
@openjdk openjdk bot closed this Dec 13, 2024
@openjdk openjdk bot removed ready Pull request is ready to be integrated rfr Pull request is ready for review labels Dec 13, 2024
@openjdk
Copy link

openjdk bot commented Dec 13, 2024

@albertnetymk Pushed as commit a9a5f7c.

💡 You may see a message that your pull request was closed with unmerged commits. This can be safely ignored.

@albertnetymk albertnetymk deleted the pgc-old-size-value branch December 13, 2024 11:46
@albertnetymk
Copy link
Member Author

/backport :jdk24

@openjdk
Copy link

openjdk bot commented Dec 13, 2024

@albertnetymk the backport was successfully created on the branch backport-albertnetymk-a9a5f7cb-jdk24 in my personal fork of openjdk/jdk. To create a pull request with this backport targeting openjdk/jdk:jdk24, just click the following link:

➡️ Create pull request

The title of the pull request is automatically filled in correctly and below you find a suggestion for the pull request body:

Hi all,

This pull request contains a backport of commit a9a5f7cb from the openjdk/jdk repository.

The commit being backported was authored by Albert Mingkun Yang on 13 Dec 2024 and was reviewed by Stefan Johansson and Thomas Schatzl.

Thanks!

If you need to update the source branch of the pull then run the following commands in a local clone of your personal fork of openjdk/jdk:

$ git fetch https://github.com/openjdk-bots/jdk.git backport-albertnetymk-a9a5f7cb-jdk24:backport-albertnetymk-a9a5f7cb-jdk24
$ git checkout backport-albertnetymk-a9a5f7cb-jdk24
# make changes
$ git add paths/to/changed/files
$ git commit --message 'Describe additional changes made'
$ git push https://github.com/openjdk-bots/jdk.git backport-albertnetymk-a9a5f7cb-jdk24

⚠️ @albertnetymk You are not yet a collaborator in my fork openjdk-bots/jdk. An invite will be sent out and you need to accept it before you can proceed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

hotspot-gc hotspot-gc-dev@openjdk.org integrated Pull request has been integrated

Development

Successfully merging this pull request may close these issues.

3 participants