RFR: 8351216: ZGC: Store NUMA node count [v2]

Joel Sikström jsikstro at openjdk.org
Wed Mar 12 16:05:15 UTC 2025


> 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

Joel Sikström has updated the pull request incrementally with one additional commit since the last revision:

  Style fix

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

Changes:
  - all: https://git.openjdk.org/jdk/pull/23922/files
  - new: https://git.openjdk.org/jdk/pull/23922/files/a2acf21a..45dc106a

Webrevs:
 - full: https://webrevs.openjdk.org/?repo=jdk&pr=23922&range=01
 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=23922&range=00-01

  Stats: 3 lines in 1 file changed: 0 ins; 1 del; 2 mod
  Patch: https://git.openjdk.org/jdk/pull/23922.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/23922/head:pull/23922

PR: https://git.openjdk.org/jdk/pull/23922


More information about the hotspot-gc-dev mailing list