JDK-8228964 : Improve G1 GCLocker allocation stall
  • Type: Enhancement
  • Component: hotspot
  • Sub-Component: gc
  • Affected Version: 14
  • Priority: P4
  • Status: Closed
  • Resolution: Duplicate
  • Submitted: 2019-08-01
  • Updated: 2024-02-23
  • Resolved: 2024-02-23
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.
Other
tbdResolved
Related Reports
Duplicate :  
Relates :  
Relates :  
Relates :  
Description
JDK-7143858 attempted to eliminate unnecessary gc-locker collections that sometimes immediately followed another young collection. Although this problem was only reported against G1, and the fix is G1-specific, it was later (JDK-8048556) found to be a problem for several other collectors too. JDK-8048556 also showed that the JDK-7143858 change was insufficient, and unnecessary gc-locker collections could still occur, due to a race with the GCLocker's active state handling.

JDK-7143858 made threads failing allocation stall when the GCLocker indicates a GC is needed, forcing them to wait until the gc-locker collection has been done. It would be better to only stall when the GCLocker is active and a GC is needed, as is done by other collectors.  This allows a thread failing allocation to proceed to the GC without waiting for the no-longer-active GCLocker's collection attempt, with the quickest doing the honors.