RFR: 8351216: ZGC: Store NUMA node count
Stefan Johansson
sjohanss at openjdk.org
Tue Mar 11 07:06:04 UTC 2025
On Wed, 5 Mar 2025 20:06:08 GMT, Joel Sikström <jsikstro at openjdk.org> wrote:
> To avoid calling into `os::Linux::max_numa_node()` and in turn libnuma on every count lookup, I propose we instead store the count statically inside ZNUMA. This is perfectly fine since the value that we get from libnuma is configured once during initialization and never change during runtime.
>
> The count is set during platform dependent initialization and the getter is now defined in the common code in ZNUMA.cpp. On operating systems that ZGC does not support NUMA for (BSD and Windows) we keep the current behavior by setting the count to 1.
>
> This is also preparation work for the Mapped Cache ([JDK-8350441](https://bugs.openjdk.org/browse/JDK-8350441)).
>
> Testing:
> * Tiers 1-3
> * GHA
> * Verify that the count is set on a Linux system with NUMA hardware
Looks good.
-------------
Marked as reviewed by sjohanss (Reviewer).
PR Review: https://git.openjdk.org/jdk/pull/23922#pullrequestreview-2673090112
More information about the hotspot-gc-dev
mailing list