RFR: 8371408: [Linux] VM.info output for container information is confusing [v2]
Casper Norrbin
cnorrbin at openjdk.org
Fri Dec 12 12:03:09 UTC 2025
On Fri, 12 Dec 2025 01:37:24 GMT, David Holmes <dholmes at openjdk.org> wrote:
>> Casper Norrbin has updated the pull request incrementally with one additional commit since the last revision:
>>
>> cross-compile fix
>
> src/hotspot/os/linux/os_linux.cpp line 2450:
>
>> 2448: assert(i > 0, "must be");
>> 2449: if (ActiveProcessorCount > 0) {
>> 2450: OSContainer::print_container_metric(st, "active_processor_count", ActiveProcessorCount, "(from -XX:ActiveProcessorCount)");
>
> Is it worth still reporting the true processor count in this case? You can infer it from `cpu_cpusets_cpus`
The "true" processor count previously reported is already restricted based on cgroup values. Since that becomes unused with the flag set, I think it's clearer to only report the value that is actually in use. As you said, if needed, we can infer the other original or potential CPU count from `cpu_cpusets_cpus` and `cpu_quota`.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/28766#discussion_r2613973981
More information about the hotspot-runtime-dev
mailing list