RFR: 8283903: GetContainerCpuLoad does not return the correct result in share mode
xpbob
duke at openjdk.java.net
Wed Mar 30 15:11:44 UTC 2022
On Wed, 30 Mar 2022 03:17:23 GMT, Jie Fu <jiefu at openjdk.org> wrote:
>>> > In share mode, the process runs for a long time and the number of physical machine cores is large, making it easier to reappear.
>>>
>>> So if we run long enough, the `getHostTotalCpuTicks0()` may return overflowed `hostTicks`, right?
>>
>> GetHostTotalCpuTicks0 is correct
>> (GetHostTotalCpuTicks0() * containerCPUs) will overflowed
>
>> GetHostTotalCpuTicks0 is correct
>> (GetHostTotalCpuTicks0() * containerCPUs) will overflowed
>
> Okay.
> It makes sense for this case.
>
> Maybe, there is no way to prevent the overflow of `hostTicks ` returned by `getHostTotalCpuTicks0()`.
> So the change looks good to me.
> Thanks.
Thanks for the reviews @DamonFool @dholmes-ora @jerboaa @kevinjwalls
-------------
PR: https://git.openjdk.java.net/jdk/pull/8028
More information about the serviceability-dev
mailing list