RFR: 8336707: Contention of ForkJoinPool grows when stealing works [v29]
Viktor Klang
vklang at openjdk.org
Wed Nov 20 10:39:27 UTC 2024
On Wed, 20 Nov 2024 08:11:34 GMT, Alan Bateman <alanb at openjdk.org> wrote:
>> src/java.base/share/classes/java/util/concurrent/ForkJoinWorkerThread.java line 247:
>>
>>> 245: = U.objectFieldOffset(Thread.class, "threadLocals");
>>> 246: private static final long INHERITABLETHREADLOCALS
>>> 247: = U.objectFieldOffset(Thread.class, "inheritableThreadLocals");
>>
>> @AlanBateman Thoughts here? 🤔
>
> resetThreadLocals looks good although. A discussion point is whether reset should be done for all FJP instances, not just the common pool but not this PR.
Thanks Alan. Yes, I think it should be considered to do it for all FJP instances.
>> src/java.base/share/classes/java/util/concurrent/ForkJoinWorkerThread.java line 270:
>>
>>> 268: @SuppressWarnings("removal")
>>> 269: public void setContextClassLoader(ClassLoader cl) {
>>> 270: if (System.getSecurityManager() != null &&
>>
>> @AlanBateman Alternatives for this? 🤔
>
> I don't think it needs an alternative, instead L270-272 will be removed as part of the SM cleanup.
Sounds like a good plan 👍
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/21507#discussion_r1850053209
PR Review Comment: https://git.openjdk.org/jdk/pull/21507#discussion_r1850054254
More information about the core-libs-dev
mailing list