8303215: Make thread stacks not use huge pages #3106
+24
−4
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hi All,
I would like to backport the fix for bug JDK-8303215 from JDK 17 to JDK 11. This bug addresses an issue with Transparent Huge Pages (THP) and thread stack allocation.
Backport is unclean,
1. Backport:
The fix in os_linux.cpp cannot be cleanly backported.
Since jdk11 does not include JDK-8244752 and JDK-8256155, it differs from the fix in jdk17. It uses setup_large_page_size() instead of scan_default_large_page_size().
2. Bug Reproduction:
The bug was successfully reproduced in Linux x86_64 with THP enabled (
/sys/kernel/mm/transparent_hugepage/enabled = always
).Reproduction was confirmed using the following dummy thread program:
The fix significantly reduces the number of anonymous regions with fully occupied RSS.
3. Regression Testing:
I ran the
test/hotspot
tests on Linux x64 as a regression test. No failures were found.Thank you.
Progress
Issue
Reviewing
Using
git
Checkout this PR locally:
$ git fetch https://git.openjdk.org/jdk11u-dev.git pull/3106/head:pull/3106
$ git checkout pull/3106
Update a local copy of the PR:
$ git checkout pull/3106
$ git pull https://git.openjdk.org/jdk11u-dev.git pull/3106/head
Using Skara CLI tools
Checkout this PR locally:
$ git pr checkout 3106
View PR using the GUI difftool:
$ git pr show -t 3106
Using diff file
Download this PR as a diff file:
https://git.openjdk.org/jdk11u-dev/pull/3106.diff
Using Webrev
Link to Webrev Comment