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

Thomas Schatzl tschatzl at openjdk.org
Wed Aug 30 09:03:13 UTC 2023


On Wed, 30 Aug 2023 08:25:15 GMT, Ivan Walulya <iwalulya at openjdk.org> wrote:

> Hi all,
> 
> Please review this change to improve on how G1 deals with ParallelGCBufferWastePct. Currently, any allocations larger than  ParallelGCBufferWastePct of the current PLAB size are allocated directly without regard for the state of the current PLAB. 
> 
> In this change, we directly check whether the current PLAB can be retired i.e. the remaining PLAB space is < ParallelGCBufferWastePct of current PLAB size.
> 
> Testing: mach5 Tier 1-6

Apart from that casing issue, looks good.

test/hotspot/jtreg/gc/g1/plab/TestPLABPromotion.java line 66:

> 64:     private final static List<String> FIELDS_TO_EXTRACT = Arrays.asList(PLAB_USED_FIELD_NAME, PLAB_DIRECT_ALLOCATED_FIELD_NAME);
> 65: 
> 66:     public final static int heapWordSize = Platform.is32bit() ? 4 : 8;

I would prefer to keep using the existing style for `static final`s.

-------------

Marked as reviewed by tschatzl (Reviewer).

PR Review: https://git.openjdk.org/jdk/pull/15482#pullrequestreview-1602237441
PR Review Comment: https://git.openjdk.org/jdk/pull/15482#discussion_r1309936087


More information about the hotspot-gc-dev mailing list