JDK-8212826 : Make PtrQueue free list lock-free
  • Type: Enhancement
  • Component: hotspot
  • Sub-Component: gc
  • Affected Version: 13
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • OS: generic
  • CPU: generic
  • Submitted: 2018-10-23
  • Updated: 2019-03-11
  • Resolved: 2019-01-20
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 13
13 b05Fixed
Related Reports
Blocks :  
Relates :  
Relates :  
Relates :  
Relates :  
Description
The PtrQueue class provides a free list for recycling buffers that have been used and processed.  This free list is presently protected by a Mutex.  Because the free list may need to be accessed as part of an Access barrier, the mutex must have "access" rank.  This mutex can also be a significant source of contention.

This free list could use a lock-free stack. The ABA problem for pop operations can be addressed by using GlobalCounter critical sections.  A pop operation is performed within a critical section.  A push operation first write_synchronizes then adds the buffer to the list.  This puts any delays on the "GC" processing side of the free list, making the mutator pops to obtain buffers inexpensive.