8257588: Make os::_page_sizes a bitmask#3160
Conversation
|
👋 Welcome back dtabata! A progress list of the required criteria for merging this PR into |
|
❗ This change is not yet ready to be integrated. |
|
This backport pull request has now been updated with issue from the original commit. |
Webrevs
|
|
This will also need updates to os_solaris.cpp - the original fix wouldn't include that, because Solaris had been removed from mainline at the time of the original change. |
|
Thanks. It's a bit more complicated than that, Solaris uses page sizes more widely. This ends up being quite a significant change as a result. Just the error lines for a build log with this patch applied on illumos, which should identify the other functions that need fixing: src/hotspot/os/solaris/os_solaris.cpp:2278:30: error: no match for 'operator[]' (operand types are 'os::PageSizes' and 'int') |
|
|
|
@ptribble I've created a fix for Solaris. Unfortunately, I don't have a Solaris environment. Could you please check if it builds without any issues? |
|
Thanks. I've successfully built the latest commit on Solaris, and a quick test is clean. |
|
GHA: At the time of the third commit in this pull request, all GHA runs were green. After that, I only merged the latest changes from |
|
@phohensee Could I trouble you to review this once again? |
phohensee
left a comment
There was a problem hiding this comment.
I'm not a Solaris expert, but looks reasonable.
|
/template append |
|
@tabata-d The pull request template has been appended to the pull request body |
|
@tabata-d This pull request has been inactive for more than 4 weeks and will be automatically closed if another 4 weeks passes without any activity. To avoid this, simply issue a |
|
/touch |
|
@tabata-d The pull request is being re-evaluated and the inactivity timeout has been reset. |
tstuefe
left a comment
There was a problem hiding this comment.
General questions/comments:
I see you have opened a whole range of backports for THP issues and tests, often patches from me originally. I see at least these:
#3160
#3171
#3172
#3194
#3195
#3210
#3211
#3212
There may be more. Please also provide information on which one of these had already been backported by Oracle, which may be a point to consider.
What is the overarching theme/reason here? Please explain the end goal. Please also provide a plan for how you want to deal with errors that will invariably happen as long as not the full chain of follow-up patches are backported.
(If I had to guess I would say you want to fix 8312182 ? If so, I wonder whether there is a simpler workaround for these old releases instead of having to backport this long chain of unclean patches.)
Update releases (especially 11 and 8) are very stable releases in which we usually limit ourselves to only very important fixes or security patches.
Cheers, Thomas
Thanks Thomas. This pretty much sums up what I was going to say as well. It is too much risk to backport every change as is, which is also demonstrated by some of the PRs being fixes for issues created by the preceding PRs. We should focus on what the actual bug is we want to fix and find the most maintainable solution for that without major changes. |
|
The end goal is to fix JDK-8312182 in OpenJDK 8. While some workarounds are conceivable, a fundamental solution is fixing JDK-8312182.
To backport JDK-8312182 to 11, the following two prerequisite fixes are necessary:
And, regressions that have already been fixed upstream also need to be backported. I have reviewed all "relates to" issues for JDK-8312182, JDK-8310233, and JDK-8257588 on JBS and determined that the following should be backported: Regressions for JDK-8257588:
Regressions for JDK-8310233:
Regressions for JDK-8312182:
Finally, the parameter name added in JDK-8312182 will be changed to align with upstream:
Risk: Testing: |
|
Hi, @tstuefe @gnu-andrew .
Looking at JBS, it seems Oracle has not backported a series of fixes to 11.
I have described it in #3160 (comment).
I plan to backport the full chain of follow-up patches. I have already issued backport PRs for the regreesion fixed upstream.
I think it would be safer to backport all prerequisite fixes and regression fixes whenever possible. Recently, the assertion made in openjdk/jdk8u-dev#808 , "Unclean backport but should be fairly safe in prep for a cleaner backport of JDK-8284047." seems to align with my way of thinking. |
I'm objecting to backporting this series of patches. Here (in JDK 11) and even more so for JDK 8u. Clearly those bugs must have existed for years. We cannot fix every potential bug. Why is the user using THP to begin with?
For some bugs that's the "better" option, rather than putting every other user who doesn't run into that bug at risk. An alternative is to upgrade the JVM (to 17). |
|
Lets continue discussion in the backport for JDK-8312182 #3210. I added my thoughts and some more questions for @tabata-d over there: #3210 (comment) |
|
After the discussion in #3210, I have decided to close this PR. |
JDK-8257588 is an enhancement aims to improve the internal handling of page sizes within the HotSpot JVM.
The fix was originally implemented in JDK 16. We are now backporting it to JDK 11.
Unclean Backport
powerOfTwo.hppheader, which centralizes these utilities in later JDK versions (introduced by JDK-8234331), was not present in JDK 11.powerOfTwo.hppwould bring in a lot of code unnecessary for JDK-8257588, so it should not be imported as-is.powerOfTwo.hpp, a highly targeted integration was performed. Only the precisepowerOfTwoutility functions essential for JDK-8257588's operation (e.g.,max_power_of_2_size_t,log2_size_t,round_down_power_of_2_size_t) were selectively extracted and adapted. These minimal, required functions were then strategically placed within the existingsrc/hotspot/share/utilities/globalDefinitions.hppfile in the JDK 11 backport.solaris.cpp, which is not in the mainline.Testing
System: Red Hat Enterprise Linux 9.4 (x86_64).
gtest: All 25 tests in the
gtest:os/serversuite, including those directly related toos::PageSizes, passed successfully.jtreg: All 672 tests in the
hotspot_runtimegroup and all 12 tests in thevmTestbase_largepagesgroup passed successfully.Progress
Issue
Reviewers
Reviewing
Using
gitCheckout this PR locally:
$ git fetch https://git.openjdk.org/jdk11u-dev.git pull/3160/head:pull/3160$ git checkout pull/3160Update a local copy of the PR:
$ git checkout pull/3160$ git pull https://git.openjdk.org/jdk11u-dev.git pull/3160/headUsing Skara CLI tools
Checkout this PR locally:
$ git pr checkout 3160View PR using the GUI difftool:
$ git pr show -t 3160Using diff file
Download this PR as a diff file:
https://git.openjdk.org/jdk11u-dev/pull/3160.diff
Using Webrev
Link to Webrev Comment