JDK-8226337 : Simplify SATBMarkQueueSet completed buffer processing management
  • Type: Enhancement
  • Component: hotspot
  • Sub-Component: gc
  • Affected Version: 14
  • Priority: P4
  • Status: Open
  • Resolution: Unresolved
  • Submitted: 2019-06-18
  • Updated: 2023-08-22
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
tbdUnresolved
Related Reports
Relates :  
Relates :  
Relates :  
Description
Currently SATBMarkQueueSet provides both the number of completed buffers in the list (completed_buffers_num) and a sticky flag (process_completed_buffers) that is set when the number exceeds a (configurable) threshold and cleared when the list is emptied.

G1 only directly uses the buffer count in assertions.

G1 uses the flag to decide whether there are enough completed buffers to be worth resuming marking (exit termination) in order to process some.

Shenandoah does not use the flag at all.

Shenandoah uses the count to decide whether to call apply_closure_to_completed_buffer (whose result it ignores).  It could just call the apply function and pay attention to the result, and not use the count at all.

The G1 behavior could leave a lot of marking work in the qset, to be processed during the remark pause.  It might be better to always resume marking if there are any buffers to process.  Though care is needed for the interaction between disabled filtering (JDK-8079167) and this decision; if the mutator is generating completed buffers because filtering is turned off then marking will keep exiting the termination protocol and resuming.  (This problem already exists with a non-zero processing threshold, and is just exacerbated by eliminating that threshold.)