RFR: 8318986: Improve GenericWaitBarrier performance [v3]
Aleksey Shipilev
shade at openjdk.org
Tue Nov 7 09:48:32 UTC 2023
On Tue, 7 Nov 2023 08:56:09 GMT, Robbin Ehn <rehn at openjdk.org> wrote:
>> Aleksey Shipilev has updated the pull request incrementally with four additional commits since the last revision:
>>
>> - Touchups
>> - More comments work
>> - Tight up the comments
>> - Rework to a single atomic counter per cell
>
> src/hotspot/share/utilities/waitBarrier_generic.cpp line 151:
>
>> 149: _sem.signal();
>> 150:
>> 151: if (wakeups++ > max) {
>
> I would assume max = 2, would call signal() max 2 times ?
> Here we end when wakeups are larger than max with post inc, so isn't that 4 times? (0->3)
Right. Should be `++wakeups >= max` to match the limit exactly. Going to fix it in next commits.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/16404#discussion_r1384640849
More information about the hotspot-dev
mailing list