Skip to content
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

JDK-8302385: Remove MetaspaceReclaimPolicy=none #12554

Conversation

tstuefe
Copy link
Member

@tstuefe tstuefe commented Feb 14, 2023

This patch removes the "MetaspaceReclaimPolicy=none" mode. It had been a safety measure when JEP-387 came out, but it has never really been needed. Since it adds complexity (especially in tests) I'd like to get rid of it.

For more details, please see the reasoning in CSR JDK-8302130.


Tests:

  • I manually ran metaspace tests (see test group "hotspot_metaspace") on linux x64 (release, fastdebug) and x86 (fastdebug)
  • GHAs are scheduled.

Reviewer hint:

Removing the "none" Policy basically hardcodes the behavioral settings to:

Settings::uncommit_free_chunks => true; (as in, we always do reclaim upon classloader death)
Settings::new_chunks_are_fully_committed => false; (as in, newly allocated chunks are only committed as far as needed)


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

Reviewers

Reviewing

Using git

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

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

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 12554

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

Using diff file

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

@bridgekeeper
Copy link

bridgekeeper bot commented Feb 14, 2023

👋 Welcome back stuefe! 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 Feb 14, 2023

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

  • hotspot-runtime

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-runtime hotspot-runtime-dev@openjdk.org label Feb 14, 2023
@tstuefe tstuefe force-pushed the JDK-8302385-Remove-MetaspaceReclaimPolicy-none branch from ad28481 to d189439 Compare February 14, 2023 10:50
@tstuefe tstuefe force-pushed the JDK-8302385-Remove-MetaspaceReclaimPolicy-none branch from d189439 to 950fc5a Compare February 15, 2023 06:54
@tstuefe tstuefe marked this pull request as ready for review February 15, 2023 07:34
@openjdk openjdk bot added the rfr Pull request is ready for review label Feb 15, 2023
@mlbridge
Copy link

mlbridge bot commented Feb 15, 2023

Webrevs

Copy link
Member

@iklam iklam left a comment

Choose a reason for hiding this comment

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

I looked at the diff with whitespace turned off. It seems to be a clean removal of the none policy.

@openjdk
Copy link

openjdk bot commented Feb 15, 2023

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

8302385: Remove MetaspaceReclaimPolicy=none

Reviewed-by: iklam, dholmes

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

  • 3ba1560: 8302026: Port fdlibm inverse trig functions (asin, acos, atan) to Java
  • 861e302: 8302163: Speed up various String comparison methods with ArraysSupport.mismatch
  • 50dcc2a: 8301460: Clean up LambdaForm to reference BasicType enums directly
  • 28f5250: 8302127: Remove unused arg in write_ref_field_post
  • 0c96584: 8301225: Replace NULL with nullptr in share/gc/shenandoah/
  • 26b111d: 8301700: Increase the default TLS Diffie-Hellman group size from 1024-bit to 2048-bit
  • 5238817: 8301463: Code in DatagramSocket still refers to resolved JDK-8237352
  • 11194e8: 8302325: Wrong comment in java.base/share/native/libjimage/imageFile.hpp
  • 33bec20: 8300808: Accelerate Base64 on x86 for AVX2
  • 46bcc49: 8302147: Speed up compiler/jvmci/compilerToVM/IterateFramesNative.java
  • ... and 1 more: https://git.openjdk.org/jdk/compare/98a392c4fc95c2bef252ea9f7d65b66c57e056ac...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 added the ready Pull request is ready to be integrated label Feb 15, 2023
Copy link
Member

@dholmes-ora dholmes-ora left a comment

Choose a reason for hiding this comment

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

The removal looks clean to me too. Thanks.

Not sure how that missing license header in the test was not previously detected!

@tstuefe
Copy link
Member Author

tstuefe commented Feb 16, 2023

Thanks @iklam and @dholmes-ora !

Not sure how that missing license header in the test was not previously detected!

Yes, that's strange, I thought someone was running automated checks for that. Maybe everyone thinks that :-)

/integrate

@openjdk
Copy link

openjdk bot commented Feb 16, 2023

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

  • 6e2d3c6: 8302455: VM.classloader_stats memory size values are wrong
  • 1480d41: 8208470: Type annotations on inner type that is an array component
  • 573c316: 8224980: FLAG_SET_ERGO silently ignores invalid values
  • 3ba1560: 8302026: Port fdlibm inverse trig functions (asin, acos, atan) to Java
  • 861e302: 8302163: Speed up various String comparison methods with ArraysSupport.mismatch
  • 50dcc2a: 8301460: Clean up LambdaForm to reference BasicType enums directly
  • 28f5250: 8302127: Remove unused arg in write_ref_field_post
  • 0c96584: 8301225: Replace NULL with nullptr in share/gc/shenandoah/
  • 26b111d: 8301700: Increase the default TLS Diffie-Hellman group size from 1024-bit to 2048-bit
  • 5238817: 8301463: Code in DatagramSocket still refers to resolved JDK-8237352
  • ... and 4 more: https://git.openjdk.org/jdk/compare/98a392c4fc95c2bef252ea9f7d65b66c57e056ac...master

Your commit was automatically rebased without conflicts.

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

openjdk bot commented Feb 16, 2023

@tstuefe Pushed as commit 519229d.

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

@tstuefe tstuefe deleted the JDK-8302385-Remove-MetaspaceReclaimPolicy-none branch April 5, 2023 05:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
hotspot-runtime hotspot-runtime-dev@openjdk.org integrated Pull request has been integrated
3 participants