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

G1: Investigate thread starvation during G1CollectedHeap::attempt_allocation_slow.

XMLWordPrintable

    • gc

      Threads may be starved of memory in G1CollectedHeap::attempt_allocation_slow while stalled either on the Heap_lock or by a GCPause.

      1. Thread A tries to allocate memory as normal, and tries to start a GC or stalls on the Heap_lock before attempt_allocation_locked; Another thread initiates a GC pause.
      2. The GC executes and frees some memory
      3. Thread A does not get any of that memory, but other threads also waiting for memory.
      4. Thread A goes back to 1.

      Investigate how to reduces the occurrence of such starvation. One solution is to pending satisfy allocations during GC. Additionally, we can satisfy multiple allocations when attempt_allocation_locked allocates out of a new region.

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

              Created:
              Updated: