RFR: 8370947: Mitigate Neoverse-N1 erratum 1542419 negative impact on GCs and JIT performance [v28]
Evgeny Astigeevich
eastigeevich at openjdk.org
Mon Mar 2 14:15:19 UTC 2026
On Thu, 26 Feb 2026 10:14:48 GMT, Andrew Haley <aph at openjdk.org> wrote:
>> src/hotspot/share/code/relocInfo.cpp line 621:
>>
>>> 619:
>>> 620:
>>> 621: bool metadata_Relocation::fix_metadata_relocation() {
>>
>> I understand we return the status here, so that we avoid invalidation when there is no real patching work was done. Granted, it likely matches the behavior we have. But I wonder how much this buys us? If we are doing the deferred invalidation in a very broad scope, it stands to reason we would _almost definitely_ have to invalidate, and all this tracking would _nearly always_ give us the same answer, "Do invalidate"?
>>
>> IOW, this might be an unnecessary complication of the interface.
>>
>> _Dropping_ this change would also be more robust, in cases something somewhere _forgets_ to announce the code cache was changed? If we don't trust the downstream code about this and just summarily invalidate, it feels safer.
>
>> @shipilev
>>
>> > But I wonder how much this buys us?
>>
>> SPECjvm crypto.aes is the case for this change. When I ran it on Graviton 2, 64 cores I got the following scores:
>>
>> * Baseline: 1047(min), 1058(max), 1052(geomean)
>>
>> * PR: 1058(min), 1078(max), 1069(geomean), +1.6% improvement
>
> This improvement is almost in the noise. What's the average SPECjvm improvement?
>
>> **OPTION 1**: If we don't track code modification in `fix_oop_relocations` and assume any call of `fix_oop_relocations` requires icache invalidation, results are the following:
>>
>> * 1032(min), 1057(max), 1045(geomean), -0.7% regression
>
> So, Options 1 and 2 are actually worse than doing nothing?
@theRealAph
> > SPECjvm crypto.aes is the case for this change. When I ran it on Graviton 2, 64 cores I got the following scores:
> > ```
> > * Baseline: 1047(min), 1058(max), 1052(geomean)
> >
> > * PR: 1058(min), 1078(max), 1069(geomean), +1.6% improvement
> > ```
>
> This improvement is almost in the noise. What's the average SPECjvm improvement?
I ran it 58 times with `-i 3 -ict -it 120 -wt 90`. The plan was to run 100 times but it would be taking a lot of time.
Baseline:
Mean
↓
ops/min Frequency
[1025,1030) │ 0
[1030,1035) │ ██ 2
[1035,1040) │ ████ 4
[1040,1045) │ ████████ 8
[1045,1050) │ ████████ 8
[1050,1055) │ █████████ 9
[1055,1060) │ █████████████ 13 ← mode
[1060,1065) │ █████ 5
[1065,1070) │ ███ 3
[1070,1075) │ ██ 2
[1075,1080) │ ██ 2
[1080,1085) │ 0
[1085,1090) │ ██ 2
[1090,1095) │ 0
└──────────────────────────
Mean = 1054.53 n = 58
Fix:
Mean
↓
ops/min Frequency
[1025,1030) │ █ 1
[1030,1035) │ 0
[1035,1040) │ █ 1
[1040,1045) │ ████ 4
[1045,1050) │ ██████ 6
[1050,1055) │ ██████████ 10
[1055,1060) │ ████████ 8
[1060,1065) │ ████████ 8
[1065,1070) │ ██████████ 10 ← mode (tied)
[1070,1075) │ ███████ 7
[1075,1080) │ █ 1
[1080,1085) │ 0
[1085,1090) │ █ 1
[1090,1095) │ █ 1
└──────────────────────────
Mean = 1059.45 n = 58
Statistical tests, 4 out of 5 tests agree (p < 0.05) that the fix produces a statistically significant, small ~0.5% but consistent performance improvement.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/28328#discussion_r2872671390
More information about the hotspot-dev
mailing list