RFR: 8322420: [Linux] cgroup v2: Limits in parent nested control groups are not detected [v2]
Thomas Stuefe
stuefe at openjdk.org
Wed Aug 28 08:52:19 UTC 2024
On Wed, 28 Aug 2024 08:43:51 GMT, Severin Gehwolf <sgehwolf at openjdk.org> wrote:
>> Okay. I dislike friend a bit since it undermines C++ scope protection. Why not make os::Linux::active_processor_count public then? If its needed from outside the Linux namespace, it should be public.
>>
>> Side note, I assume we cannot just use `os::active_processor_count()` because it handles the containerized case, and what we really want here is the real physical count?
>>
>> Not for this RFE, but a bit cleaner may be if we had something like os::active_processor_count() - taking care of handling the ActiveProcessorCount switch and reporting container limits if containerized - and something like "os::active_physical_processor_count()" , which would report the real physical number.
>
> I'd be happy to make `os::Linux::active_processor_count` public as part of this patch. Or add the `os::active_physical_processor_count()` api as you suggest. It would also make #19530 cleaner since it needs to know the host CPU values too. What would you like me to do here? How about keep as-is, then I'll file a new issue to clean this up by introducing `os::active_physical_processor_count()`?
I leave it up to you, I am fine with doing it in this RFE or in a follow up.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/20646#discussion_r1734264245
More information about the hotspot-runtime-dev
mailing list