JDK-8280917 : Simplify G1ConcurrentRefineThread activation
  • Type: Enhancement
  • Component: hotspot
  • Sub-Component: gc
  • Affected Version: 19
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2022-01-30
  • Updated: 2022-02-15
  • Resolved: 2022-02-08
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 19
19 b09Fixed
Related Reports
Relates :  
Relates :  
Description
JDK-8237143 changed G1ConcurrentRefineThread to use a semaphore and surrounding protocol for activation, rather than a Monitor.  This was part of eliminating the DirtyCardQ_cbl_mon monitor, getting rid of a lock in the dirty card buffer handling.

The resulting activation protocol is somewhat complicated because it needs to deal with two fairly different clients.  One is the dirty card buffer handling from the write barrier, which may need to wake up the "primary" refinement thread.  The other is wakeup of additional refinement threads.

Both cases could be simplified by splitting the refinement thread class into two subclasses, one for the primary thread and one for the other threads.  The other threads could go back to using monitor-based activation control.  Only the primary thread needs to use atomic state and semaphores, and even there the protocol can be made simpler.

Comments
Changeset: 861f2797 Author: Kim Barrett <kbarrett@openjdk.org> Date: 2022-02-08 09:02:53 +0000 URL: https://git.openjdk.java.net/jdk/commit/861f2797f7d56ab185117f27dae2660af9250f6a
08-02-2022

A pull request was submitted for review. URL: https://git.openjdk.java.net/jdk/pull/7282 Date: 2022-01-31 00:08:10 +0000
31-01-2022