RFR: 8233281: Obsolete UseSemaphoreGCThreadsSynchronization

Stefan Karlsson stefan.karlsson at oracle.com
Fri Aug 14 14:31:18 UTC 2020



On 2020-08-14 16:12, Kim Barrett wrote:
>> On Aug 14, 2020, at 9:42 AM, Stefan Karlsson <stefan.karlsson at oracle.com> wrote:
>>
>> Hi all,
>>
>> Please review this patch to obsolete the diagnostic UseSemaphoreGCThreadsSynchronization JVM option.
>>
>> https://bugs.openjdk.java.net/browse/JDK-8233281
>> https://cr.openjdk.java.net/~stefank/8233281/webrev.01
>>
>> I added this flag when implementing:
>> 8087324: Use semaphores when starting and stopping GC task threads
>>
>> It was intended to be a fallback solution if the new semaphore implementation failed to to work for any reason. We've used the semaphore code for many years now, and the Mutex implementation has bit rottened.
>>
>> The proposed patch both obsoletes the the JVM flag, and removes the Mutex dispatch mechanism.
>>
>> Thanks,
>> StefanK
> 
> Looks good, so far as it goes.

Thanks.

> 
> Is there a reason to retain the distinction between GangTaskDispatcher and SemaphoreGangTaskDispatcher?
> If not, I’m okay with separating the hierarchy collapse as a cleanup to follow.
> 

Sounds good to me. I started an initial attempt where I completely 
removed the dynamic allocation, but backed of because I then had move 
around too much code. Simply collapsing the hierarchy seems easy enough:

https://cr.openjdk.java.net/~stefank/8233281/webrev.02.delta/
https://cr.openjdk.java.net/~stefank/8233281/webrev.02/

StefanK



More information about the hotspot-gc-dev mailing list