RFR: 8283903: GetContainerCpuLoad does not return the correct result in share mode

Jie Fu jiefu at openjdk.java.net
Wed Mar 30 02:04:37 UTC 2022


On Wed, 30 Mar 2022 01:46:20 GMT, xpbob <duke at openjdk.java.net> wrote:

> ```        
>                long hostTicks = getHostTotalCpuTicks0();
>                 int totalCPUs = getHostOnlineCpuCount0();
>                 int containerCPUs = getAvailableProcessors();
>                 // scale the total host load to the actual container cpus
>                 hostTicks = hostTicks * containerCPUs / totalCPUs;
> 
> hostTicks=175476155560000000
> totalCPUs=96
> containerCPUs=90
> 
> Calculate the overflow

It would be better to describe how to reproduce the bug.

Is it possible to add a jtreg test for this case?
Please also update the copyright year.

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

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


More information about the serviceability-dev mailing list