RFR: 8370492: [Linux] Update cpu shares to cpu.weight mapping function [v2]
Severin Gehwolf
sgehwolf at openjdk.org
Mon Nov 10 09:25:05 UTC 2025
On Mon, 10 Nov 2025 06:38:46 GMT, SendaoYan <syan at openjdk.org> wrote:
>> Severin Gehwolf has updated the pull request with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought in by the merge/rebase. The pull request contains five additional commits since the last revision:
>>
>> - Merge branch 'master' into jdk-8370492-fix-cpushares-mapping
>> - Fix include
>> - Add asserts/checks for input domain
>> - Add regression test for jdk-8370492
>> - 8370492: [Linux] Update cpu shares to cpu.weight mapping function
>
> test/jdk/jdk/internal/platform/docker/MetricsCpuTester.java line 151:
>
>> 149: // have a 1-to-1 mapping from the cgroup v2 value to the OCI
>> 150: // value.
>> 151: System.out.println("Debug: cgv2 - Got CPU shares of: " +
>
> I found you 'import jtreg.SkippedException;' on file test/hotspot/jtreg/containers/docker/TestMisc.java. Do you want to 'throw new SkippedException' rather that just print 'Skipping assert'
I'd rather not, since by throwing `SkippedException` the other tests won't run either. It's useful to see various values for the back-mapped value. In this case it should be a value < 1024 which is asserted by the if. Later, we have actual assertions in the test for `1024` and `2048`. Does that make sense?
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/28157#discussion_r2509490319
More information about the hotspot-runtime-dev
mailing list