RFR: 8205051: UseNUMA memory interleaving vs cpunodebind & localalloc [v2]

Swati Sharma duke at openjdk.org
Fri Dec 13 10:27:59 UTC 2024


On Mon, 9 Dec 2024 10:18:36 GMT, Stefan Johansson <sjohanss at openjdk.org> wrote:

>> Swati Sharma has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   8205051: Resolved review comments.
>
> src/hotspot/os/linux/os_linux.cpp line 4516:
> 
>> 4514:       FLAG_SET_ERGO(UseNUMA, false);
>> 4515:       FLAG_SET_ERGO(UseNUMAInterleaving, false);
>> 4516: 
> 
> Thought a bit more on this and I think it's better if we make it more explicit in the warning why NUMA was disabled. Especially now when we have three different reasons. What do you think about:
> Suggestion:
> 
>     if (Linux::numa_max_node() < 1) {
>       disable_numa("Only a single NUMA node is available");
>     } else if (Linux::is_bound_to_single_mem_node()) {
>       disable_numa("The process is bound to a single NUMA node");
>     } else if (Linux::mem_and_cpu_node_mismatch()) {
>       disable_numa("The process memory and cpu node configuration does not match");
> 
> 
> And:
> 
> static void disable_numa(const char* reason) {
>   if ((UseNUMA && FLAG_IS_CMDLINE(UseNUMA)) ||
>       (UseNUMAInterleaving && FLAG_IS_CMDLINE(UseNUMAInterleaving))) {
>     // Only issue a warning if the user explicitly asked for NUMA support
>     log_warning(os)("NUMA support disabled: %s", reason);
>   }
>   FLAG_SET_ERGO(UseNUMA, false);
>   FLAG_SET_ERGO(UseNUMAInterleaving, false);
> }

I agree, looks good to me. Addressed in the latest commit.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/22395#discussion_r1883704715


More information about the hotspot-runtime-dev mailing list