On Wed, 13 Nov 2024 23:38:30 GMT, Vladimir Ivanov <vaiva...@openjdk.org> wrote:

>> This patch remove access to the shared variable to fix scalability issue in 
>> the multithread environment. According to testing by the 
>> specjvm2008::crypto.rsa the one thread performance reduced for less than 1% 
>> while the score for the multithread run increased in ~2x. For the 2 socket 
>> system with Xeon 8480+ numbers looks as:
>> •    1 thread: 643.15 for original version vs 642.54 for patched one;
>> •    224 threads: 22446.19 for original vs 46147.41 for patched.
>> The RSABench microbenchmark reports no score changes for the 1 thread 
>> (average for all testcases) and 2.4% improvement for the 224 threads.
>
> Vladimir Ivanov has updated the pull request incrementally with one 
> additional commit since the last revision:
> 
>   8317538: Potential bottleneck in Provider::getService: 
> specjvm2008::crypto.rsa have scalability issue for high vCPU numbers

The ThreadLocal variable has similar compiler warning. With the field declared 
as:
===
    private ThreadLocal<ServiceKey> previousKey = new ThreadLocal<ServiceKey>();

Compiler for call 'previousKey.get();' reports: 
=== Output from failing command(s) repeated here ===
* For target jdk_modules_java.base__the.java.base_batch:
jdk/src/java.base/share/classes/java/security/Provider.java:1284: warning: 
[serial] non-transient instance field of a serializable class declared with a 
non-serializable type
        ServiceKey key = previousKey.get();

Could you add some words about scenario when 'transient' modifier leads to 
problem?
For now this field also not serialized.

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

PR Comment: https://git.openjdk.org/jdk/pull/21719#issuecomment-2475182230

Reply via email to