RFR: JDK-8262326: MaxMetaspaceSize does not have to be aligned to metaspace commit alignment

Thomas Stuefe stuefe at openjdk.java.net
Fri Feb 26 16:31:57 UTC 2021


Currently MaxMetaspaceSize is aligned to commit alignment in Metaspace::ergo_initialize(). 

That is unnecessary. MaxMetaspaceSize is just a number to compare the metaspace commit charge against. The fact that we commit in discrete uniform steps (since JEP-387, the size of a commit granule) makes no difference to that comparison.

This alignment introduced subtle display errors where the default value of max_uintx was aligned down, and that not-quite-max_uintx was not recognized to mean "infinite" (see JDK-8262099).

-----------

Tests: GA, nightlies at SAP

-------------

Commit messages:
 - Do not align MaxMetaspaceSize

Changes: https://git.openjdk.java.net/jdk/pull/2721/files
 Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=2721&range=00
  Issue: https://bugs.openjdk.java.net/browse/JDK-8262326
  Stats: 9 lines in 2 files changed: 0 ins; 5 del; 4 mod
  Patch: https://git.openjdk.java.net/jdk/pull/2721.diff
  Fetch: git fetch https://git.openjdk.java.net/jdk pull/2721/head:pull/2721

PR: https://git.openjdk.java.net/jdk/pull/2721


More information about the hotspot-runtime-dev mailing list