7198334: UseNUMA modifies system parameters on non-NUMA system
authorbrutisso
Tue Nov 20 11:40:11 2012 +0100 (6 months ago)
changeset 386153715fb1597d
parent 3849e1d42ba865de
child 386219c1bd641922
7198334: UseNUMA modifies system parameters on non-NUMA system
Summary: The flags MinHeapDeltaBytes and UseNUMAInterleaving must be adjusted after the OS have adjusted the UseNUMA flag in the method os::init_2.
Reviewed-by: dholmes, brutisso
Contributed-by: erik.helin@oracle.com
src/share/vm/runtime/arguments.cpp
src/share/vm/runtime/arguments.hpp
src/share/vm/runtime/thread.cpp
--- a/src/share/vm/runtime/arguments.cpp Fri Nov 16 09:43:43 2012 -0800
+++ b/src/share/vm/runtime/arguments.cpp Tue Nov 20 11:40:11 2012 +0100
@@ -1484,14 +1484,6 @@ void Arguments::set_parallel_gc_flags()
FLAG_SET_DEFAULT(MarkSweepDeadRatio, 1);
}
}
- }
- if (UseNUMA) {
- if (FLAG_IS_DEFAULT(MinHeapDeltaBytes)) {
- FLAG_SET_DEFAULT(MinHeapDeltaBytes, 64*M);
- }
- // For those collectors or operating systems (eg, Windows) that do
- // not support full UseNUMA, we will map to UseNUMAInterleaving for now
- UseNUMAInterleaving = true;
}
}
@@ -3332,6 +3324,22 @@ jint Arguments::parse(const JavaVMInitAr
return JNI_OK;
}
+jint Arguments::adjust_after_os() {
+#if INCLUDE_ALTERNATE_GCS
+ if (UseParallelGC || UseParallelOldGC) {
+ if (UseNUMA) {
+ if (FLAG_IS_DEFAULT(MinHeapDeltaBytes)) {
+ FLAG_SET_DEFAULT(MinHeapDeltaBytes, 64*M);
+ }
+ // For those collectors or operating systems (eg, Windows) that do
+ // not support full UseNUMA, we will map to UseNUMAInterleaving for now
+ UseNUMAInterleaving = true;
+ }
+ }
+#endif
+ return JNI_OK;
+}
+
int Arguments::PropertyList_count(SystemProperty* pl) {
int count = 0;
while(pl != NULL) {
--- a/src/share/vm/runtime/arguments.hpp Fri Nov 16 09:43:43 2012 -0800
+++ b/src/share/vm/runtime/arguments.hpp Tue Nov 20 11:40:11 2012 +0100
@@ -409,6 +409,8 @@ class Arguments : AllStatic {
public:
// Parses the arguments
static jint parse(const JavaVMInitArgs* args);
+ // Adjusts the arguments after the OS have adjusted the arguments
+ static jint adjust_after_os();
// Check for consistency in the selection of the garbage collector.
static bool check_gc_consistency();
// Check consistecy or otherwise of VM argument settings
--- a/src/share/vm/runtime/thread.cpp Fri Nov 16 09:43:43 2012 -0800
+++ b/src/share/vm/runtime/thread.cpp Tue Nov 20 11:40:11 2012 +0100
@@ -3334,6 +3334,9 @@ jint Threads::create_vm(JavaVMInitArgs*
jint os_init_2_result = os::init_2();
if (os_init_2_result != JNI_OK) return os_init_2_result;
+ jint adjust_after_os_result = Arguments::adjust_after_os();
+ if (adjust_after_os_result != JNI_OK) return adjust_after_os_result;
+
// intialize TLS
ThreadLocalStorage::init();