mirror of
https://github.com/openjdk/jdk.git
synced 2025-09-18 01:54:47 +02:00
8243961: ForceNUMA and only one available NUMA node fails assertion on Windows
Improve ergnomics for UseNUMA and UseNUMAInterleaving Reviewed-by: tschatzl, sjohanss
This commit is contained in:
parent
317bd88e33
commit
7ae3bea212
6 changed files with 28 additions and 19 deletions
|
@ -5175,7 +5175,8 @@ void os::Linux::numa_init() {
|
|||
// bitmask when externally configured to run on all or fewer nodes.
|
||||
|
||||
if (!Linux::libnuma_init()) {
|
||||
UseNUMA = false;
|
||||
FLAG_SET_ERGO(UseNUMA, false);
|
||||
FLAG_SET_ERGO(UseNUMAInterleaving, false); // Also depends on libnuma.
|
||||
} else {
|
||||
if ((Linux::numa_max_node() < 1) || Linux::is_bound_to_single_node()) {
|
||||
// If there's only one node (they start from 0) or if the process
|
||||
|
@ -5208,6 +5209,11 @@ void os::Linux::numa_init() {
|
|||
}
|
||||
}
|
||||
|
||||
// When NUMA requested, not-NUMA-aware allocations default to interleaving.
|
||||
if (UseNUMA && !UseNUMAInterleaving) {
|
||||
FLAG_SET_ERGO_IF_DEFAULT(UseNUMAInterleaving, true);
|
||||
}
|
||||
|
||||
if (UseParallelGC && UseNUMA && UseLargePages && !can_commit_large_page_memory()) {
|
||||
// With SHM and HugeTLBFS large pages we cannot uncommit a page, so there's no way
|
||||
// we can make the adaptive lgrp chunk resizing work. If the user specified both
|
||||
|
@ -5272,7 +5278,7 @@ jint os::init_2(void) {
|
|||
log_info(os)("HotSpot is running with %s, %s",
|
||||
Linux::glibc_version(), Linux::libpthread_version());
|
||||
|
||||
if (UseNUMA) {
|
||||
if (UseNUMA || UseNUMAInterleaving) {
|
||||
Linux::numa_init();
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue