src/os/windows/vm/os_windows.cpp
Index Unified diffs Context diffs Sdiffs Patch New Old Previous File Next File UseNUMA Sdiff src/os/windows/vm

src/os/windows/vm/os_windows.cpp

Print this page
rev 3419 : 7179517: Enable NUMA by default on NUMA hardware
Summary: Enable UseNUMA by default on NUMA hardware
Reviewed-by: jwilhelm


3780     // note: perfMemory_exit_helper atexit function may be removed in
3781     // the future if the appropriate cleanup code can be added to the
3782     // VM_Exit VMOperation's doit method.
3783     if (atexit(perfMemory_exit_helper) != 0) {
3784       warning("os::init_2 atexit(perfMemory_exit_helper) failed");
3785     }
3786   }
3787 
3788 #ifndef _WIN64
3789   // Print something if NX is enabled (win32 on AMD64)
3790   NOT_PRODUCT(if (PrintMiscellaneous && Verbose) nx_check_protection());
3791 #endif
3792 
3793   // initialize thread priority policy
3794   prio_init();
3795 
3796   if (UseNUMA && !ForceNUMA) {
3797     UseNUMA = false; // We don't fully support this yet
3798   }
3799 
3800   if (UseNUMAInterleaving) {










3801     // first check whether this Windows OS supports VirtualAllocExNuma, if not ignore this flag
3802     bool success = numa_interleaving_init();
3803     if (!success) UseNUMAInterleaving = false;
3804   }
3805 
3806   return JNI_OK;
3807 }
3808 
3809 void os::init_3(void) {
3810   return;
3811 }
3812 
3813 // Mark the polling page as unreadable
3814 void os::make_polling_page_unreadable(void) {
3815   DWORD old_status;
3816   if( !VirtualProtect((char *)_polling_page, os::vm_page_size(), PAGE_NOACCESS, &old_status) )
3817     fatal("Could not disable polling page");
3818 };
3819 
3820 // Mark the polling page as readable




3780     // note: perfMemory_exit_helper atexit function may be removed in
3781     // the future if the appropriate cleanup code can be added to the
3782     // VM_Exit VMOperation's doit method.
3783     if (atexit(perfMemory_exit_helper) != 0) {
3784       warning("os::init_2 atexit(perfMemory_exit_helper) failed");
3785     }
3786   }
3787 
3788 #ifndef _WIN64
3789   // Print something if NX is enabled (win32 on AMD64)
3790   NOT_PRODUCT(if (PrintMiscellaneous && Verbose) nx_check_protection());
3791 #endif
3792 
3793   // initialize thread priority policy
3794   prio_init();
3795 
3796   if (UseNUMA && !ForceNUMA) {
3797     UseNUMA = false; // We don't fully support this yet
3798   }
3799 
3800 #ifdef _LP64
3801   // For 64 bit numa systems, enable numa features if heap is large enough
3802   bool use_numa_by_default = FLAG_IS_DEFAULT(UseNUMA) && is_server_class_machine() && MaxHeapSize >= NUMAAutoStartHeapSize;
3803 #else
3804   bool use_numa_by_default = false;
3805 #endif
3806 
3807   if (UseNUMAInterleaving || use_numa_by_default) {
3808 #ifdef _LP64
3809     UseNUMAInterleaving = true;
3810 #endif
3811     // first check whether this Windows OS supports VirtualAllocExNuma, if not ignore this flag
3812     bool success = numa_interleaving_init();
3813     if (!success) UseNUMAInterleaving = false;
3814   }
3815 
3816   return JNI_OK;
3817 }
3818 
3819 void os::init_3(void) {
3820   return;
3821 }
3822 
3823 // Mark the polling page as unreadable
3824 void os::make_polling_page_unreadable(void) {
3825   DWORD old_status;
3826   if( !VirtualProtect((char *)_polling_page, os::vm_page_size(), PAGE_NOACCESS, &old_status) )
3827     fatal("Could not disable polling page");
3828 };
3829 
3830 // Mark the polling page as readable


src/os/windows/vm/os_windows.cpp
Index Unified diffs Context diffs Sdiffs Patch New Old Previous File Next File