RFR: 8336707: Contention of ForkJoinPool grows when stealing works
Viktor Klang
vklang at openjdk.org
Wed Oct 16 16:45:13 UTC 2024
On Mon, 14 Oct 2024 20:58:43 GMT, Doug Lea <dl at openjdk.org> wrote:
> This addresses tendencies in previous update to increase fencing, scanning, and signalling that can increase contention, and slow down performance especially on ARM platforms. It also uses more ARM-friendly constructions to reduce overhead (leading to several changes that all of the same form),
src/java.base/share/classes/java/util/concurrent/ForkJoinPool.java line 2279:
> 2277: if (U.compareAndSetReference(a, k, t, null)) {
> 2278: q.base = b + 1;
> 2279: w.source = j;
Might be worth commenting the volatile-write piggybacking which allows to get away with not calling updateBase above? 🤔
src/java.base/share/classes/java/util/concurrent/ForkJoinPool.java line 2433:
> 2431: if (U.compareAndSetReference(a, k, t, null)) {
> 2432: q.base = nb;
> 2433: w.source = j;
Might be worth commenting the volatile-write piggybacking which allows to get away with not calling updateBase above? 🤔
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/21507#discussion_r1803467095
PR Review Comment: https://git.openjdk.org/jdk/pull/21507#discussion_r1803468091
More information about the core-libs-dev
mailing list