8191862: Warn about UseNUMA/UseLargePages only when using ParallelGC

Reviewed-by: stefank, sjohanss
This commit is contained in:
Per Lidén 2017-11-27 13:34:00 +01:00
parent 9771e4daa7
commit 1e7b0b326d

View file

@ -4948,25 +4948,20 @@ jint os::init_2(void) {
UseNUMA = false; UseNUMA = false;
} }
} }
// 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 if (UseParallelGC && UseNUMA && UseLargePages && !can_commit_large_page_memory()) {
// both UseNUMA and UseLargePages (or UseSHM/UseHugeTLBFS) on the command line - warn and // With SHM and HugeTLBFS large pages we cannot uncommit a page, so there's no way
// disable adaptive resizing. // we can make the adaptive lgrp chunk resizing work. If the user specified both
if (UseNUMA && UseLargePages && !can_commit_large_page_memory()) { // UseNUMA and UseLargePages (or UseSHM/UseHugeTLBFS) on the command line - warn
if (FLAG_IS_DEFAULT(UseNUMA)) { // and disable adaptive resizing.
UseNUMA = false; if (UseAdaptiveSizePolicy || UseAdaptiveNUMAChunkSizing) {
} else { warning("UseNUMA is not fully compatible with SHM/HugeTLBFS large pages, "
if (FLAG_IS_DEFAULT(UseLargePages) && "disabling adaptive resizing (-XX:-UseAdaptiveSizePolicy -XX:-UseAdaptiveNUMAChunkSizing)");
FLAG_IS_DEFAULT(UseSHM) && UseAdaptiveSizePolicy = false;
FLAG_IS_DEFAULT(UseHugeTLBFS)) { UseAdaptiveNUMAChunkSizing = false;
UseLargePages = false;
} else if (UseAdaptiveSizePolicy || UseAdaptiveNUMAChunkSizing) {
warning("UseNUMA is not fully compatible with SHM/HugeTLBFS large pages, disabling adaptive resizing (-XX:-UseAdaptiveSizePolicy -XX:-UseAdaptiveNUMAChunkSizing)");
UseAdaptiveSizePolicy = false;
UseAdaptiveNUMAChunkSizing = false;
}
} }
} }
if (!UseNUMA && ForceNUMA) { if (!UseNUMA && ForceNUMA) {
UseNUMA = true; UseNUMA = true;
} }