Currently, ZNUMA::count() calls os::Linux::numa_max_node() to get how many NUMA nodes are available. os::Linux::numa_max_node() in turn calls into libnuma to figure out how many nodes are configured on the system.
Instead of calling into os::Linux and libnuma on every count lookup, I instead propose we read the count during initialization once and store it statically inside the ZNUMA class. The value that we get all the way from libnuma never changes, so there is no point calling to get it all the time.
On platforms where ZGC does not support NUMA, the count can be set to 1, as is returned by the ZNUMA::count() functions on those platforms currently.
Instead of calling into os::Linux and libnuma on every count lookup, I instead propose we read the count during initialization once and store it statically inside the ZNUMA class. The value that we get all the way from libnuma never changes, so there is no point calling to get it all the time.
On platforms where ZGC does not support NUMA, the count can be set to 1, as is returned by the ZNUMA::count() functions on those platforms currently.
- links to
-
Commit(master) openjdk/jdk/7e3bc81e
-
Review(master) openjdk/jdk/23922