mirror of
https://github.com/openjdk/jdk.git
synced 2025-09-20 11:04:34 +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
|
@ -4096,10 +4096,13 @@ jint os::init_2(void) {
|
|||
UseNUMA = false; // We don't fully support this yet
|
||||
}
|
||||
|
||||
if (UseNUMAInterleaving) {
|
||||
// first check whether this Windows OS supports VirtualAllocExNuma, if not ignore this flag
|
||||
bool success = numa_interleaving_init();
|
||||
if (!success) UseNUMAInterleaving = false;
|
||||
if (UseNUMAInterleaving || (UseNUMA && FLAG_IS_DEFAULT(UseNUMAInterleaving))) {
|
||||
if (!numa_interleaving_init()) {
|
||||
FLAG_SET_ERGO(UseNUMAInterleaving, false);
|
||||
} else if (!UseNUMAInterleaving) {
|
||||
// When NUMA requested, not-NUMA-aware allocations default to interleaving.
|
||||
FLAG_SET_ERGO(UseNUMAInterleaving, true);
|
||||
}
|
||||
}
|
||||
|
||||
if (initSock() != JNI_OK) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue