JDK-8315219 : G1: Improve allocator pathological case where it keeps doing direct allocations instead of retiring a PLAB
  • Type: Enhancement
  • Component: hotspot
  • Sub-Component: gc
  • Affected Version: 22
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2023-08-29
  • Updated: 2023-09-07
  • Resolved: 2023-08-31
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 22
22 b14Fixed
Related Reports
Relates :  
Description
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. 
Comments
Changeset: 47aa6f3a Author: Ivan Walulya <iwalulya@openjdk.org> Date: 2023-08-31 08:04:47 +0000 URL: https://git.openjdk.org/jdk/commit/47aa6f3a65559d8143511561ac9d18cfb133263e
31-08-2023

A pull request was submitted for review. URL: https://git.openjdk.org/jdk/pull/15482 Date: 2023-08-30 08:25:15 +0000
30-08-2023