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

ZGC: Move defragment out of the allocation path

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Fixed
    • Icon: P4 P4
    • 24
    • 24
    • hotspot
    • gc
    • b19

      In JDK-8276055 we added a defragmentation mechanism to avoid having small pages in higher parts of the address space. The defragmentation (remapping the page to a lower address) is currently done in the allocation path when a small page is split out of a larger page from the cache.

      Remapping the page comes with a cost and to minimize the impact on mutators the defragmentation could be moved out of the allocation path and instead be done when pages are freed after a GC.

      Such a move comes with the cost of allowing small pages to reside at higher addresses when used, but as soon as the page is garbage collected the address space will be freed up and the page remapped to a lower address before being cached.

            sjohanss Stefan Johansson
            sjohanss Stefan Johansson
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: