RFR: 8339148: Add os::active_physical_processor_count() API

David Holmes dholmes at openjdk.org
Mon Sep 2 05:17:26 UTC 2024


On Fri, 30 Aug 2024 08:45:52 GMT, Severin Gehwolf <sgehwolf at openjdk.org> wrote:

>> OK. Happy to change the name to something more suitable. The idea is to have a function that returns the "available" cpus of the node/host whether in container or not. How about `available_host_processor_count()`?
>
> Just to be clear. It's not a goal to introduce new semantics.  What we need is an public accessible way to query this information.

It doesn't make sense to try and add an API that is exactly the same as `os::available_processors` except on Linux. This is a Linux and Linux container problem.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/20768#discussion_r1740333260


More information about the hotspot-runtime-dev mailing list