On Sat, 4 Apr 2026 18:52:54 GMT, Doug Lea <[email protected]> wrote:

>> Changes signal filtering to avoid possible starvation
>
> Doug Lea has updated the pull request incrementally with one additional 
> commit since the last revision:
> 
>   For rechecking v27 under head

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

> 2006:                             }
> 2007:                             else {
> 2008:                                 boolean propagate;

@DougLea Not sure if it helps, but it might make register allocation happier—we 
could re-use `more` instead of introducing `propagate` so that the code becomes:


                                long np = slotOffset((pb = b + 1) & m);
                                boolean more = (U.getReferenceVolatile(a, np) 
!= null);
                                q.base = pb;
                                w.nsteals = ++nsteals;
                                int prevSrc = src;
                                w.source = src = qid;    // volatile
                                rescan = true;
                                if (more =
                                    (more &&
                                     (prevSrc != qid ||
                                      ((qid & 1) == 0 &&
                                       (fifo != 0 || t.noUserHelp() != 0)))))
                                    signalWork();
                                w.topLevelExec(t, fifo);
                                if ((b = q.base) != pb && !more)
                                    break scan;          // reduce interference

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

PR Review Comment: https://git.openjdk.org/jdk/pull/28797#discussion_r3060847014

Reply via email to