RFR: 8318986: Improve GenericWaitBarrier performance [v4]

Aleksey Shipilev shade at openjdk.org
Tue Nov 7 20:22:18 UTC 2023


On Tue, 7 Nov 2023 12:57:43 GMT, Robbin Ehn <rehn at openjdk.org> wrote:

>> Aleksey Shipilev has updated the pull request with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought in by the merge/rebase. The pull request contains ten additional commits since the last revision:
>> 
>>  - Encode barrier tag into state, resolving another race condition
>>  - Simple review feedback fixes: tracking wakeup numbers, reflowing some methods
>>  - Merge branch 'master' into JDK-8318986-generic-wait-barrier
>>  - Touchups
>>  - More comments work
>>  - Tight up the comments
>>  - Rework to a single atomic counter per cell
>>  - Tigthen up memory ordering even more conservatively
>>  - Fix
>
> src/hotspot/share/utilities/waitBarrier_generic.hpp line 38:
> 
>> 36:   private:
>> 37:     DEFINE_PAD_MINUS_SIZE(0, DEFAULT_CACHE_LINE_SIZE, 0);
>> 38: 
> 
> Just reading the padding, it's unclear why the two pads are where they are.
> Can you add a comment about why choose these two locations?

Wanted to make sure nothing interferes with cells. But now I realize we actually overpad between the cells (due to both pre-cell and post-cell padding), and underpad for the barrier itself! Fixed in new commit.

-------------

PR Review Comment: https://git.openjdk.org/jdk/pull/16404#discussion_r1385515426


More information about the hotspot-dev mailing list