4217 tty->print_cr("\nThe stack size specified is too small, "
4218 "Specify at least %dk",
4219 os::Linux::min_stack_allowed/ K);
4220 return JNI_ERR;
4221 }
4222
4223 // Make the stack size a multiple of the page size so that
4224 // the yellow/red zones can be guarded.
4225 JavaThread::set_stack_size_at_create(round_to(threadStackSizeInBytes,
4226 vm_page_size()));
4227
4228 Linux::capture_initial_stack(JavaThread::stack_size_at_create());
4229
4230 Linux::libpthread_init();
4231 if (PrintMiscellaneous && (Verbose || WizardMode)) {
4232 tty->print_cr("[HotSpot is running with %s, %s(%s)]\n",
4233 Linux::glibc_version(), Linux::libpthread_version(),
4234 Linux::is_floating_stack() ? "floating stack" : "fixed stack");
4235 }
4236
4237 if (UseNUMA) {
4238 if (!Linux::libnuma_init()) {
4239 UseNUMA = false;
4240 } else {
4241 if ((Linux::numa_max_node() < 1)) {
4242 // There's only one node(they start from 0), disable NUMA.
4243 UseNUMA = false;
4244 }
4245 }
4246 // With SHM large pages we cannot uncommit a page, so there's not way
4247 // we can make the adaptive lgrp chunk resizing work. If the user specified
4248 // both UseNUMA and UseLargePages (or UseSHM) on the command line - warn and
4249 // disable adaptive resizing.
4250 if (UseNUMA && UseLargePages && UseSHM) {
4251 if (!FLAG_IS_DEFAULT(UseNUMA)) {
4252 if (FLAG_IS_DEFAULT(UseLargePages) && FLAG_IS_DEFAULT(UseSHM)) {
4253 UseLargePages = false;
4254 } else {
4255 warning("UseNUMA is not fully compatible with SHM large pages, disabling adaptive resizing");
4256 UseAdaptiveSizePolicy = false;
4257 UseAdaptiveNUMAChunkSizing = false;
4258 }
4259 } else {
4260 UseNUMA = false;
4261 }
4262 }
4263 if (!UseNUMA && ForceNUMA) {
4264 UseNUMA = true;
|
4217 tty->print_cr("\nThe stack size specified is too small, "
4218 "Specify at least %dk",
4219 os::Linux::min_stack_allowed/ K);
4220 return JNI_ERR;
4221 }
4222
4223 // Make the stack size a multiple of the page size so that
4224 // the yellow/red zones can be guarded.
4225 JavaThread::set_stack_size_at_create(round_to(threadStackSizeInBytes,
4226 vm_page_size()));
4227
4228 Linux::capture_initial_stack(JavaThread::stack_size_at_create());
4229
4230 Linux::libpthread_init();
4231 if (PrintMiscellaneous && (Verbose || WizardMode)) {
4232 tty->print_cr("[HotSpot is running with %s, %s(%s)]\n",
4233 Linux::glibc_version(), Linux::libpthread_version(),
4234 Linux::is_floating_stack() ? "floating stack" : "fixed stack");
4235 }
4236
4237 #ifdef _LP64
4238 // For 64 bit numa systems, enable numa features if heap is large enough
4239 if (UseNUMA || (FLAG_IS_DEFAULT(UseNUMA) && is_server_class_machine())) {
4240 #else
4241 if (UseNUMA) {
4242 #endif
4243 if (!Linux::libnuma_init()) {
4244 UseNUMA = false;
4245 } else {
4246 if ((Linux::numa_max_node() < 1)) {
4247 // There's only one node(they start from 0), disable NUMA.
4248 UseNUMA = false;
4249 }
4250 #ifdef _LP64
4251 else {
4252 // There is more than 1 node
4253 if (FLAG_IS_DEFAULT(UseNUMA) && (MaxHeapSize >= NUMAAutoStartHeapSize)) {
4254 UseNUMA = true;
4255 UseNUMAInterleaving = true;
4256 }
4257 }
4258 #endif
4259 }
4260 // With SHM large pages we cannot uncommit a page, so there's not way
4261 // we can make the adaptive lgrp chunk resizing work. If the user specified
4262 // both UseNUMA and UseLargePages (or UseSHM) on the command line - warn and
4263 // disable adaptive resizing.
4264 if (UseNUMA && UseLargePages && UseSHM) {
4265 if (!FLAG_IS_DEFAULT(UseNUMA)) {
4266 if (FLAG_IS_DEFAULT(UseLargePages) && FLAG_IS_DEFAULT(UseSHM)) {
4267 UseLargePages = false;
4268 } else {
4269 warning("UseNUMA is not fully compatible with SHM large pages, disabling adaptive resizing");
4270 UseAdaptiveSizePolicy = false;
4271 UseAdaptiveNUMAChunkSizing = false;
4272 }
4273 } else {
4274 UseNUMA = false;
4275 }
4276 }
4277 if (!UseNUMA && ForceNUMA) {
4278 UseNUMA = true;
|