< prev index next >
src/hotspot/os/linux/os_linux.cpp
Print this page
rev 59103 : [mq]: take2
@@ -5173,11 +5173,12 @@
// numa_all_nodes_ptr holds bitmask of all nodes.
// numa_get_interleave_mask(v2) and numa_get_membind(v2) APIs returns correct
// 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
// is bound explicitly to a single node using membind, disable NUMA unless
// user explicilty forces NUMA optimizations on single-node/UMA systems
@@ -5206,10 +5207,15 @@
}
}
}
}
+ // 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
// UseNUMA and UseLargePages (or UseSHM/UseHugeTLBFS) on the command line - warn
// and disable adaptive resizing.
@@ -5270,11 +5276,11 @@
Linux::libpthread_init();
Linux::sched_getcpu_init();
log_info(os)("HotSpot is running with %s, %s",
Linux::glibc_version(), Linux::libpthread_version());
- if (UseNUMA) {
+ if (UseNUMA || UseNUMAInterleaving) {
Linux::numa_init();
}
if (MaxFDLimit) {
// set the number of file descriptors to max. print out error
< prev index next >