RFR: 8336707: Contention of ForkJoinPool grows when stealing works [v29]
Alan Bateman
alanb at openjdk.org
Wed Nov 20 08:14:23 UTC 2024
On Tue, 19 Nov 2024 16:57:05 GMT, Viktor Klang <vklang at openjdk.org> wrote:
>> Doug Lea has updated the pull request incrementally with one additional commit since the last revision:
>>
>> Ensure InnocuousForkJoinWorkerThread usable with or without SecurityManager
>
> 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 it the reset should be done for all FJP instances, not just the common pool but not this PR.
> 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.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/21507#discussion_r1849809984
PR Review Comment: https://git.openjdk.org/jdk/pull/21507#discussion_r1849810047
More information about the core-libs-dev
mailing list