RFR: 8373118: Test java/lang/Thread/virtual/Starvation.java timed out [v5]
Viktor Klang
vklang at openjdk.org
Mon Dec 15 10:21:33 UTC 2025
On Sun, 14 Dec 2025 13:06:46 GMT, Doug Lea <dl at openjdk.org> wrote:
>> Changes signal filtering to avoid possible starvation
>
> Doug Lea has updated the pull request incrementally with one additional commit since the last revision:
>
> Adjust runworker for previous update
src/java.base/share/classes/java/util/concurrent/ForkJoinPool.java line 1892:
> 1890: }
> 1891: if (q != null && q.base - qbase > 0)
> 1892: break;
Crazy idea: Only create new workers on successful CAS if no queue-drift has occurred, but always prioritize to wake up sleeping workers regardless?
Suggestion:
if (v != null) {
v.phase = sp;
if (v.parking != 0)
U.unpark(v.owner);
} else if (q == null || q.base - qbase == 0)
createWorker();
break;
}
if (q != null && q.base - qbase > 0)
break;
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/28797#discussion_r2618808997
More information about the core-libs-dev
mailing list