RFR: 8371701: Add ability to set NUMA-affinity for threads [v6]

Axel Boldt-Christmas aboldtch at openjdk.org
Mon Nov 24 12:59:56 UTC 2025


On Mon, 24 Nov 2025 12:55:35 GMT, Joel Sikström <jsikstro at openjdk.org> wrote:

>> Hello,
>> 
>> This PR adds support for setting the affinity of threads to run on CPUs associated with specific NUMA nodes on Linux. Support for this is needed for [JDK-8371702](https://bugs.openjdk.org/browse/JDK-8371702) to improve performance in the Relocation Phase of ZGC on a NUMA machine.
>> 
>> Testing:
>> * I've run significant performance testing locally on a NUMA machine and performed functional testing to see that the affinity is actually changed. Affinity of a thread can be inspected on Linux using `taskset -cp <tid>`.
>> * Running through Oracle's tier1-2
>
> Joel Sikström has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains six commits:
> 
>  - Merge branch 'master' into JDK-8371701_numa_affinity_threads
>  - Offline review feedback from Axel
>  - Harden comment around user configuration
>  - Remove comparison
>  - Change return type of numa_set_thread_affinity to void
>  - 8371701: Add ability to set NUMA-affinity for threads

Marked as reviewed by aboldtch (Reviewer).

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

PR Review: https://git.openjdk.org/jdk/pull/28261#pullrequestreview-3500243904


More information about the hotspot-runtime-dev mailing list