JDK-8243392 : Remodel CDS/Metaspace storage reservation
  • Type: Enhancement
  • Component: hotspot
  • Sub-Component: runtime
  • Affected Version: 15
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2020-04-22
  • Updated: 2024-09-28
  • Resolved: 2020-05-24
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 15
15 b25Fixed
Related Reports
Blocks :  
Duplicate :  
Duplicate :  
Relates :  
Relates :  
Relates :  
Relates :  
Relates :  
Relates :  
Relates :  
Relates :  
Relates :  
Description
Reservation of the compressed class space has evolved over time, is needlessly complicated and has some minor issues. It can be simplified and made clearer.

The complexity stems from the fact that this area lives at the intersection of two to three sub systems, depending on how one counts:
- metaspace
- cds
- the platform which may or may not its own view of how to reserve ccs
, and all this code has been growing organically over time.

So it would be nice could we disentangle the involved parties a bit, remove unnecessary cross-subsystem knowledge, comment and so on. 

Ioi Lam proposed an improvement which would make some of the complexity fold into itself [1].

Also, there are some subtle bugs, e.g.:

- cds misuses metaspace alignment which is not correct and, were the alignment anything other than page size, would lead to errors.
- the compressed class pointer encoding range is set up slightly wrong, which may theoretically lead to errors on aarch64 [2].
- NMT may not correctly track class and shared archive [3]


[1] https://mail.openjdk.java.net/pipermail/aarch64-port-dev/2020-April/008765.html
[2] https://mail.openjdk.java.net/pipermail/aarch64-port-dev/2020-April/008804.html
[3] https://bugs.openjdk.java.net/browse/JDK-8243535


Comments
URL: https://hg.openjdk.java.net/jdk/jdk/rev/fe3a9edeb7c9 User: stuefe Date: 2020-05-24 18:59:58 +0000
24-05-2020