Skip to content

8346005: Parallel: Incorrect page size calculation with UseLargePages #26700

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

albertnetymk
Copy link
Member

@albertnetymk albertnetymk commented Aug 8, 2025

Refactor the heap-space and OS memory interface code to clearly separate two related but distinct concepts: alignment and os-page-size. These are now represented as two fields in PSVirtualSpace.

The parallel heap consists of four spaces: old, eden, from, and to. The first belongs to the old generation, while the latter three belong to the young generation.

The size of any space is always aligned to alignment, which also determines the unit for resizing. To keep the implementation simple while allowing flexible per-space commit and uncommit operations, each space must contain at least one OS page. As a result, alignment is always greater than or equal to os-page-size.

When using explicit large pages -- which require pre-allocating large pages before the VM starts -- the actual OS page size is not known until the heap has been reserved. The additional logic in ParallelScavengeHeap::initialize detects the OS page size in use and adjusts alignment if necessary.

Test: tier1–8


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-8346005: Parallel: Incorrect page size calculation with UseLargePages (Bug - P4)

Reviewing

Using git

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

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

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 26700

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

Using diff file

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

Using Webrev

Link to Webrev Comment

@bridgekeeper
Copy link

bridgekeeper bot commented Aug 8, 2025

👋 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 Aug 8, 2025

❗ This change is not yet ready to be integrated.
See the Progress checklist in the description for automated requirements.

@openjdk openjdk bot changed the title 8346005 8346005: Parallel: Incorrect page size calculation with UseLargePages Aug 8, 2025
@openjdk
Copy link

openjdk bot commented Aug 8, 2025

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

  • hotspot

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.

@albertnetymk
Copy link
Member Author

/cc hotspot-gc

@openjdk openjdk bot added rfr Pull request is ready for review hotspot-gc [email protected] labels Aug 8, 2025
@openjdk
Copy link

openjdk bot commented Aug 8, 2025

@albertnetymk
The hotspot-gc label was successfully added.

@mlbridge
Copy link

mlbridge bot commented Aug 8, 2025

Webrevs

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

Successfully merging this pull request may close these issues.

1 participant