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

Remodel CDS/Metaspace storage reservation

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Fixed
    • Icon: P4 P4
    • 15
    • 15
    • hotspot
    • b25

      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

            stuefe Thomas Stuefe
            stuefe Thomas Stuefe
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: