RFR: 8336707: Contention of ForkJoinPool grows when stealing works [v5]

Viktor Klang vklang at openjdk.org
Fri Oct 25 12:24:07 UTC 2024


On Thu, 24 Oct 2024 20:41:46 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),
>
> Doug Lea has updated the pull request incrementally with one additional commit since the last revision:
> 
>   For starvation check #2

src/java.base/share/classes/java/util/concurrent/ForkJoinPool.java line 1272:

> 1270:             int s = top, b = base, m, cap, room; ForkJoinTask<?>[] a;
> 1271:             if ((a = array) != null && (cap = a.length) > 0 &&
> 1272:                 task != null) {                             // else disabled

Can `task` ever be null here? or is this check just to avoid subsequent implicit nullchecks?

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

PR Review Comment: https://git.openjdk.org/jdk/pull/21507#discussion_r1816581681


More information about the core-libs-dev mailing list