< prev index next >

src/hotspot/os/linux/os_linux.cpp

Print this page
rev 58103 : Disable adaptive sizing when ForceNuma is used with parallel gc and UseLargePages


5138 
5139       struct bitmask* bmp = Linux::_numa_membind_bitmask;
5140       const char* numa_mode = "membind";
5141 
5142       if (Linux::is_running_in_interleave_mode()) {
5143         bmp = Linux::_numa_interleave_bitmask;
5144         numa_mode = "interleave";
5145       }
5146 
5147       ls.print("UseNUMA is enabled and invoked in '%s' mode."
5148                " Heap will be configured using NUMA memory nodes:", numa_mode);
5149 
5150       for (int node = 0; node <= Linux::numa_max_node(); node++) {
5151         if (Linux::_numa_bitmask_isbitset(bmp, node)) {
5152           ls.print(" %d", node);
5153         }
5154       }
5155     }
5156   }
5157 




5158   if (UseParallelGC && UseNUMA && UseLargePages && !can_commit_large_page_memory()) {
5159     // With SHM and HugeTLBFS large pages we cannot uncommit a page, so there's no way
5160     // we can make the adaptive lgrp chunk resizing work. If the user specified both
5161     // UseNUMA and UseLargePages (or UseSHM/UseHugeTLBFS) on the command line - warn
5162     // and disable adaptive resizing.
5163     if (UseAdaptiveSizePolicy || UseAdaptiveNUMAChunkSizing) {
5164       warning("UseNUMA is not fully compatible with SHM/HugeTLBFS large pages, "
5165               "disabling adaptive resizing (-XX:-UseAdaptiveSizePolicy -XX:-UseAdaptiveNUMAChunkSizing)");
5166       UseAdaptiveSizePolicy = false;
5167       UseAdaptiveNUMAChunkSizing = false;
5168     }
5169   }
5170 
5171   if (!UseNUMA && ForceNUMA) {
5172     UseNUMA = true;
5173   }
5174 }
5175 
5176 // this is called _after_ the global arguments have been parsed
5177 jint os::init_2(void) {
5178 
5179   // This could be set after os::Posix::init() but all platforms
5180   // have to set it the same so we have to mirror Solaris.
5181   DEBUG_ONLY(os::set_mutex_init_done();)
5182 
5183   os::Posix::init_2();
5184 
5185   Linux::fast_thread_clock_init();
5186 
5187   // initialize suspend/resume support - must do this before signal_sets_init()
5188   if (SR_initialize() != 0) {
5189     perror("SR_initialize failed");
5190     return JNI_ERR;
5191   }
5192 
5193   Linux::signal_sets_init();




5138 
5139       struct bitmask* bmp = Linux::_numa_membind_bitmask;
5140       const char* numa_mode = "membind";
5141 
5142       if (Linux::is_running_in_interleave_mode()) {
5143         bmp = Linux::_numa_interleave_bitmask;
5144         numa_mode = "interleave";
5145       }
5146 
5147       ls.print("UseNUMA is enabled and invoked in '%s' mode."
5148                " Heap will be configured using NUMA memory nodes:", numa_mode);
5149 
5150       for (int node = 0; node <= Linux::numa_max_node(); node++) {
5151         if (Linux::_numa_bitmask_isbitset(bmp, node)) {
5152           ls.print(" %d", node);
5153         }
5154       }
5155     }
5156   }
5157 
5158   if (!UseNUMA && ForceNUMA) {
5159     UseNUMA = true;
5160   }
5161 
5162   if (UseParallelGC && UseNUMA && UseLargePages && !can_commit_large_page_memory()) {
5163     // With SHM and HugeTLBFS large pages we cannot uncommit a page, so there's no way
5164     // we can make the adaptive lgrp chunk resizing work. If the user specified both
5165     // UseNUMA and UseLargePages (or UseSHM/UseHugeTLBFS) on the command line - warn
5166     // and disable adaptive resizing.
5167     if (UseAdaptiveSizePolicy || UseAdaptiveNUMAChunkSizing) {
5168       warning("UseNUMA is not fully compatible with SHM/HugeTLBFS large pages, "
5169               "disabling adaptive resizing (-XX:-UseAdaptiveSizePolicy -XX:-UseAdaptiveNUMAChunkSizing)");
5170       UseAdaptiveSizePolicy = false;
5171       UseAdaptiveNUMAChunkSizing = false;
5172     }
5173   }




5174 }
5175 
5176 // this is called _after_ the global arguments have been parsed
5177 jint os::init_2(void) {
5178 
5179   // This could be set after os::Posix::init() but all platforms
5180   // have to set it the same so we have to mirror Solaris.
5181   DEBUG_ONLY(os::set_mutex_init_done();)
5182 
5183   os::Posix::init_2();
5184 
5185   Linux::fast_thread_clock_init();
5186 
5187   // initialize suspend/resume support - must do this before signal_sets_init()
5188   if (SR_initialize() != 0) {
5189     perror("SR_initialize failed");
5190     return JNI_ERR;
5191   }
5192 
5193   Linux::signal_sets_init();


< prev index next >