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

SegmentedCodeCache fails when using large pages

    XMLWordPrintable

Details

    • b09

    Backports

      Description

        When large pages are enabled, the VM tries to use at least one page for all code cache segments which fails if there is not enough space:

        $ java -XX:+UseLargePages -XX:+SegmentedCodeCache -XX:InitialCodeCacheSize=2g -XX:ReservedCodeCacheSize=2g -XX:LargePageSizeInBytes=1g -Xlog:pagesize*=debug -version
        [0.000s][debug][pagesize] Large Page sizes: 2M, 1G
        [0.000s][info ][pagesize] Overriding default large page size (2M) using LargePageSizeInBytes: 1G
        [0.001s][info ][pagesize] Usable page sizes: 4k, 2M, 1G
        [0.003s][debug][pagesize] Commit special mapping: 0x00007fefc0000000, size=2G, page size=1G
        [0.003s][info ][pagesize] CodeHeap 'non-nmethods': min=1G max=6M base=0x00007fefffc00000 page_size=1G size=6M
        Error occurred during initialization of VM
        Could not reserve enough space in CodeHeap 'non-nmethods' (6144K)

        We should not exit them VM but fall back to a smaller page size for the failing segment.

        Thanks to Scott Oaks for reporting.

        Attachments

          Issue Links

            Activity

              People

                dfenacci Damon Fenacci
                thartmann Tobias Hartmann
                Votes:
                0 Vote for this issue
                Watchers:
                9 Start watching this issue

                Dates

                  Created:
                  Updated:
                  Resolved: