RFR: JDK-8261894: Remove support for UseSHM
David Holmes
dholmes at openjdk.org
Tue Sep 12 01:48:40 UTC 2023
On Fri, 21 Jul 2023 10:14:14 GMT, Thomas Stuefe <stuefe at openjdk.org> wrote:
> We decided to ditch the SystemV-based large-page handling code in Linux a while ago. For history and details, please see JBS issue and the accompanying [CSR](https://bugs.openjdk.org/browse/JDK-8310841).
>
> This patch
>
> 1) removes the support for `-XX:+UseSHM` and all its backing code. It obsoletes `UseSHM`.
>
> 2) `UseSHM` had just been the negation of `UseHugeTLBFS` (in hindsight, a single mode switch would have been better). The POSIX-mmap-based implementation behind `UseHugeTLBFS` remains the sole implementation of static large pages in the JVM. The flag `UseHugeTLBFS` itself is not needed anymore since there is nothing to distinguish it from. Therefore I removed that flag, too.
>
> 3) `UseLargePages` and `UseTransparentHugePages` are unaffected. Their meaning remains the same:
> `UseLargePages` => using static hugepages
> `UseLargePages` + `UseTransparentHugePages` => using THPs
> `UseTransparentHugePages` => using THPs, enables also `UseLargePages`
>
> This allows for many code removals and simplifications. We can ditch the SystemV large page setup and management, its sanity tests, its regression tests, and associated documentation. We can also lose some of the tests, code, and documentation surrounding HugeTLBFS.
>
> Testing: I manually ran many tests with many different huge page settings on Linux x64. GHAs are green (one remaining x86 error is unrelated).
>
> Note that I will be out on vacation in September and may not respond to reviews in a timely fashion.
Generally this looks okay - one issue with the doc to sort out.
I will hold off on the approve button for now and wait until you are back from vacation.
src/java.base/share/man/java.1 line 1:
> 1: .\" Copyright (c) 1994, 2023, Oracle and/or its affiliates. All rights reserved.
The text for the flags to be obsoleted should be moved to the "Obsoleted Flags" section of the document. But we need to update the closed sources for the manpage and then propagate the update from there. It may be easiest to create a sub-task for that and I can apply the closed changes.
-------------
PR Review: https://git.openjdk.org/jdk/pull/14970#pullrequestreview-1621104030
PR Review Comment: https://git.openjdk.org/jdk/pull/14970#discussion_r1322266171
More information about the hotspot-runtime-dev
mailing list