Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update Split List Forced Flag + Revert CRIU Thread Count Reinit #17459

Merged
merged 1 commit into from
Jun 20, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 2 additions & 12 deletions runtime/gc_modron_startup/mminit.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3050,8 +3050,7 @@ BOOLEAN
gcReinitializeDefaultsForRestore(J9VMThread* vmThread)
{
MM_GCExtensions* extensions = MM_GCExtensions::getExtensions(vmThread);
MM_EnvironmentBase* env = MM_EnvironmentBase::getEnvironment(vmThread->omrVMThread);
J9JavaVM* vm = vmThread->javaVM;
J9JavaVM *vm = vmThread->javaVM;
bool result = true;

PORT_ACCESS_FROM_JAVAVM(vm);
Expand All @@ -3063,21 +3062,12 @@ gcReinitializeDefaultsForRestore(J9VMThread* vmThread)
result = false;
}

/* Init of thread count will only occur if it is not enforced by gcParseReconfigurableArguments. */
extensions->configuration->initializeGCThreadCount(env);

/* If the thread count is being forced, check its validity and display a warning message if it is invalid, then mark it as invalid (see comment below). */
/* If the thread count is being forced, check its validity and display a warning message if it is invalid, then mark it as invalid. */
if (extensions->gcThreadCountForced && (extensions->gcThreadCount < extensions->dispatcher->threadCountMaximum())) {
j9nls_printf(PORTLIB, J9NLS_WARNING, J9NLS_GC_THREAD_VALUE_MUST_BE_ABOVE_WARN, (UDATA)extensions->dispatcher->threadCountMaximum());
extensions->gcThreadCountForced = false;
}

/* Currently, threads don't shutdown during restore, so ensure thread count doesn't fall below
* the checkpoint thread count. This adjustment can be removed in the future when dispatcher
* thread shutdown is sufficiently tested at restore.
*/
extensions->gcThreadCount = OMR_MAX(extensions->dispatcher->threadCountMaximum(), extensions->gcThreadCount);

return result;
}
#endif /* defined(J9VM_OPT_CRIU_SUPPORT) */
Expand Down
5 changes: 5 additions & 0 deletions runtime/gc_modron_startup/mmparseXXgc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@

#include "mmparse.h"

#include "Configuration.hpp"
#include "GCExtensions.hpp"
#if defined(J9VM_GC_REALTIME)
#include "Scheduler.hpp"
Expand Down Expand Up @@ -641,6 +642,7 @@ gcParseXXgcArguments(J9JavaVM *vm, char *optArg)
returnValue = JNI_EINVAL;
break;
}
extensions->configuration->_packetListSplitForced = true;
continue;
}

Expand All @@ -655,6 +657,7 @@ gcParseXXgcArguments(J9JavaVM *vm, char *optArg)
returnValue = JNI_EINVAL;
break;
}
extensions->configuration->_cacheListSplitForced = true;
RSalman marked this conversation as resolved.
Show resolved Hide resolved
continue;
}
#endif /* J9VM_GC_MODRON_SCAVENGER */
Expand Down Expand Up @@ -698,6 +701,7 @@ gcParseXXgcArguments(J9JavaVM *vm, char *optArg)
break;
}
extensions->enableHybridMemoryPool = true;
extensions->configuration->_splitFreeListAmountForced = true;
continue;
}

Expand All @@ -712,6 +716,7 @@ gcParseXXgcArguments(J9JavaVM *vm, char *optArg)
returnValue = JNI_EINVAL;
break;
}
extensions->configuration->_splitFreeListAmountForced = true;
continue;
}

Expand Down