Details
-
Bug
-
Resolution: Fixed
-
P3
-
11.0.10, 17, 18, 19
-
b15
Backports
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-8298516 | 17.0.7-oracle | Calvin Cheung | P3 | Resolved | Fixed | b01 |
JDK-8296536 | 17.0.6 | Aleksey Shipilev | P3 | Resolved | Fixed | b02 |
JDK-8298515 | 11.0.19-oracle | Calvin Cheung | P3 | Resolved | Fixed | b01 |
JDK-8297330 | 11.0.18 | Aleksey Shipilev | P3 | Resolved | Fixed | b04 |
Description
This does not reproduce if you run startup workloads continuously, as it looks as if /proc/cpuinfo is cached for about a second, and stalls reads after that, I suspect for CPU info updates, like frequency.
Observe:
$ for I in `seq 1 3`; do sleep 1; time build/linux-x86_64-server-release/images/jdk/bin/java -Xms128m -Xmx128m -version > /dev/null 2>&1 ; done
real 0m0.046s
real 0m0.045s
real 0m0.046s
Without the sleep:
$ for I in `seq 1 3`; do time build/linux-x86_64-server-release/images/jdk/bin/java -Xms128m -Xmx128m -version > /dev/null 2>&1 ; done
real 0m0.026s
real 0m0.026s
real 0m0.023s
There is another way to do this: read /sys/devices/system/cpu/cpu0/microcode/version. With dirty patch and sleep 1:
real 0m0.025s
real 0m0.024s
real 0m0.024s
It raises a bigger question if VM features string should be generated on startup, but it seems to take negligible time otherwise, see JDK-8283200. Given
Attachments
Issue Links
- backported by
-
JDK-8296536 Linux os::cpu_microcode_revision() stalls cold startup
- Resolved
-
JDK-8297330 Linux os::cpu_microcode_revision() stalls cold startup
- Resolved
-
JDK-8298515 Linux os::cpu_microcode_revision() stalls cold startup
- Resolved
-
JDK-8298516 Linux os::cpu_microcode_revision() stalls cold startup
- Resolved
- relates to
-
JDK-8283200 Generate VMVersion::_futures_string lazily
- Open
-
JDK-8249672 Include microcode revision in features_string on x86
- Resolved
- links to
-
Commit openjdk/jdk11u-dev/5d9c09b8
-
Commit openjdk/jdk17u-dev/6196d93e
-
Commit openjdk/jdk/1443f6b9
-
Review openjdk/jdk11u-dev/1471
-
Review openjdk/jdk17u-dev/820
-
Review openjdk/jdk/7825