RFR: 8336707: Contention of ForkJoinPool grows when stealing works

Viktor Klang vklang at openjdk.org
Wed Oct 16 16:41:15 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 1969:

> 1967:             int phase = w.phase, r = w.stackPred;     // seed from registerWorker
> 1968:             int cfg = w.config, nsteals = 0, src = -1;
> 1969:             for (;;) {

Could the non-labeled version introduce different GC safepoints which could have adverse impacts? 🤔

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

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


More information about the core-libs-dev mailing list