On Wed, 5 May 2021 21:16:07 GMT, Argha C 
<github.com+971473+argh...@openjdk.org> wrote:

>> Hi Argha, thanks a lot for your suggestion. I think both "quota" and "share" 
>> are worth considering. Let us look into the implementation of 
>> `CgroupSubsystem::active_processor_count()` in OpenJDK HotSpot 
>> (https://github.com/openjdk/jdk/blob/master/src/hotspot/os/linux/cgroupSubsystem_linux.cpp).
>
> Thanks for linking that. It sounds reasonable to me to prefer `quota` in that 
> case.

> @argha-c The proposed fix is within the `quota > 0` condition. I.e. this is 
> code only run when CPU quotas, _not_ shares are in effect. In docker/podman 
> speach these are `--cpu-quota=...` and `--cpu-period=....` switches. So no, 
> in this case it wouldn't make sense to use cpu shares info in a branch which 
> looks at cpu quotas ;-)

@jerboaa : Correct. My comment was less specific to the branch, and more to 
highlight that a fix here needs to consider the case for both `quota` and 
`shares`. I see the bug report has been updated to reflect that. Cheers.

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

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

Reply via email to