RFR: 8305670: Performance regression in LockSupport.unpark with lots of idle threads [v4]
David Holmes
dholmes at openjdk.org
Thu Apr 27 02:37:24 UTC 2023
On Thu, 27 Apr 2023 02:03:47 GMT, David Holmes <dholmes at openjdk.org> wrote:
>> Daniel D. Daugherty has updated the pull request incrementally with one additional commit since the last revision:
>>
>> 8305670.with-rehn-quick-mode.cr3.patch
>
> src/hotspot/share/classfile/javaClasses.cpp line 1573:
>
>> 1571: void java_lang_Thread::set_thread(oop java_thread, JavaThread* thread) {
>> 1572: java_thread->release_address_field_put(_eetop_offset, (address)thread);
>> 1573: }
>
> There is a convention that when we have acquire/release semantics, that we make that evident in the name of the method so that it is obvious at the call-site. So these would need renaming to `thread_acquire` and `release_set_thread`.
Or, to avoid a lot of changes, add new methods for the acquire/release variants. Really only the setting to non-null requires release semantics. Which reads need acquire semantics is much harder to analyse - but most will not due to other inherent synchronization either via Threads_lock, or at the Java level.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/13519#discussion_r1178561526
More information about the hotspot-runtime-dev
mailing list