RFR: 8370492: [Linux] Update cpu shares to cpu.weight mapping function [v4]

Severin Gehwolf sgehwolf at openjdk.org
Wed Nov 12 20:28:42 UTC 2025


On Wed, 12 Nov 2025 16:37:30 GMT, Severin Gehwolf <sgehwolf at openjdk.org> wrote:

>> test/hotspot/jtreg/containers/docker/TestMisc.java line 107:
>> 
>>> 105:         // Don't use 1024 exactly so as to avoid mapping to the unlimited/uset case.
>>> 106:         // Use a value > 100 post-mapping so as to hit the non-default branch: 1052 => 103
>>> 107:         printContainerInfo(1052, 1024, true);
>> 
>> These tests fail in rootless Podman containers using cgroup v1, because that configuration does not support resource limits. We get the following error to stderr:
>> `Resource limits are not supported and ignored on cgroups V1 rootless systems`
>> and the cpu shares value is reset to 1024. `cpu_shares: no shares` is then in the output, leading to the first test failing. Then, `1024 != 1052` which leads to the second test failing.
>
> OK. Thanks for the heads-up. I'll test it. We have infra to check for rootless and can skip it there.

Should be fixed in the update with: https://github.com/openjdk/jdk/pull/28157/commits/9417bdbeb4d458489953a54d253e8f79dc678734

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

PR Review Comment: https://git.openjdk.org/jdk/pull/28157#discussion_r2519710367


More information about the hotspot-runtime-dev mailing list