RFR: 8283199: Linux os::cpu_microcode_revision() stalls cold startup [v3]

Aleksey Shipilev shade at openjdk.java.net
Mon Mar 21 13:59:50 UTC 2022


On Mon, 21 Mar 2022 13:35:31 GMT, Aleksey Shipilev <shade at openjdk.org> wrote:

> > Do you know _why_ access to /proc is slower than to /sys/devices? Is it all /proc accesses or just /proc/cpuinfo?
> 
> I suspect that's because we generate the entirety of `/proc/cpuinfo` on read, which includes doing lots of string printing, getting the CPU frequency (which, AFAICS, includes IPI). I have not explored this part deeply, though.
> 

I further suspect this is where the 1 second "cache" comes from: getting frequency from APERF snapshot: https://github.com/torvalds/linux/blob/master/arch/x86/kernel/cpu/aperfmperf.c#L33

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

PR: https://git.openjdk.java.net/jdk/pull/7825


More information about the hotspot-runtime-dev mailing list