[jdk11u-dev] RFR: 8269851: OperatingSystemMXBean getProcessCpuLoad reports incorrect process cpu usage in containers

Severin Gehwolf sgehwolf at openjdk.java.net
Wed Aug 4 09:11:35 UTC 2021


On Tue, 3 Aug 2021 16:04:31 GMT, Severin Gehwolf <sgehwolf at openjdk.org> wrote:

> Please review this backport of JDK-8269851 to OpenJDK 11u. That code stream is affected by the same bug and should get fixed in the same way as it got fixed with [JDK-8265836](https://bugs.openjdk.java.net/browse/JDK-8265836) for system CPU load, but for process CPU load.
> 
> The patch only differs minimally from the JDK 18 patch, but doesn't apply clean due to the following reason. This version uses `getSystemCpuLoad()` and `getSystemCpuLoad0()` instead of `getCpuLoad()` and `getCpuLoad0()`.
> 
> Testing: Manually using the reproducer code from the bug and tier1 on Linux x86_64.
> 
> Thoughts?

Thanks for the review. Yes, I'll try to get it into JDK 17 too.

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

PR: https://git.openjdk.java.net/jdk11u-dev/pull/183


More information about the jdk-updates-dev mailing list