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

Permit use of memory concurrent with pretouch

    XMLWordPrintable

Details

    • Enhancement
    • Status: Resolved
    • P4
    • Resolution: Fixed
    • 18
    • 19
    • hotspot
    • b10

    Description

      os::pretouch_memory is called under various circumstances, to ensure the OS has actually mapped physical memory to the associated committed virtual memory range. It is implemented using a store to each page in the range. A load won't do, because some OS's initially map a write-protected shared zero page.

      Because pretouching involves writes, it must be done before any use of the memory. That can stall useful work that could be using some pages while the complete range gets touched.

      An alternative to a simple store is an atomic add of zero to a location in the page. Performance testing suggests there isn't any noticeable difference between using ordinary stores and (relaxed) atomic add of zero to touch pages on either x64 or aarch64. The page allocation swamps the cost of the atomic operation.

      Attachments

        Issue Links

          Activity

            People

              kbarrett Kim Barrett
              kbarrett Kim Barrett
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: