[prev in list] [next in list] [prev in thread] [next in thread]
List: openjdk-serviceability-dev
Subject: Re: RFR: 8283903: GetContainerCpuLoad does not return the correct result in share mode
From: xpbob <duke () openjdk ! java ! net>
Date: 2022-03-30 15:11:44
Message-ID: a_PiiT606dUUSfcrJtHp808-xIrAPqlU-nrBFh75c4A=.29af2d77-2762-4960-ae14-9ee9fd7ec93c () github ! com
[Download RAW message or body]
On Wed, 30 Mar 2022 03:17:23 GMT, Jie Fu <jiefu@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
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic