JDK-8274987 : G1: reuse the newly allocated G1SegmentedArrayBuffer even if current thread failed the race
  • Type: Enhancement
  • Component: hotspot
  • Sub-Component: gc
  • Affected Version: 18
  • Priority: P4
  • Status: Open
  • Resolution: Unresolved
  • Submitted: 2021-10-09
  • Updated: 2021-11-02
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 :  
Description
This is a follow-up of JDK-8273626.

Current (original) implementation just drops the newly allocated G1SegmentedArrayBuffer if current thread fails race, but seems reuse (e.g adding to freelist) will bring some benefit.


https://github.com/openjdk/jdk/pull/5478#issuecomment-938498538
Comments
To reuse (i.e adding to freelist) the newly allocated or poped buffer, we need to call GlobalCounter::write_synchronize() before _free_buffer_list->add(*next) in G1SegmentedArray::create_new_buffer, but write_synchronize might bring some performance degragation instead of the benefit we expected. So, for now will hold this issue, until we have clear measurement about the cost introduced by write_synchronize here. https://github.com/openjdk/jdk/pull/6034#discussion_r733301436
21-10-2021

Hi! could you make the description standalone and not (only) link to the github discussion. It is easier to read, and might be good in the future if web links go bad.
11-10-2021