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

G1: Improve allocator pathological case where it keeps doing direct allocations instead of retiring a PLAB

XMLWordPrintable

    • gc
    • b14

      In the slow path for PLAB allocation G1 needs to determine whether it should discard the current PLAB buffer to allocate an object or do direct allocation.

      To keep the waste percentage goal of 10% (i.e. ParallelGCBufferWastePct) it always directly allocates objects that are larger than ParallelGCBufferWastePct percent of the current PLAB size. This results in direct allocations even in cases where the current PLAB is fully used up and should be retired.

      It is better to directly check for whether the current PLAB can be retired i.e. the remaining PLAB space is < ParallelGCBufferWastePct of current PLAB size.

      This moves the pathological behaviour to cases where allocations larger than the remaining PLAB space are allocated directly because the current PLAB cannot be retired (the remaining space is more than the threshold -ParallelGCBufferWastePct of current PLAB). This issue is addressed by JDK-8258088.

            iwalulya Ivan Walulya
            iwalulya Ivan Walulya
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: