Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8243392

Remodel CDS/Metaspace storage reservation


    • Type: Enhancement
    • Status: Resolved
    • Priority: P4
    • Resolution: Fixed
    • Affects Version/s: 15
    • Fix Version/s: 15
    • Component/s: hotspot
    • Subcomponent:
    • Resolved In Build:


      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


          Issue Links



              • Assignee:
                stuefe Thomas Stuefe
                stuefe Thomas Stuefe
              • Votes:
                0 Vote for this issue
                4 Start watching this issue


                • Created: