-
Notifications
You must be signed in to change notification settings - Fork 729
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
GC Thread Pool Tuning for CRIU #16385
Conversation
5337bae
to
d7e2c90
Compare
@tajila @amicic @dmitripivkine please have a look |
Following changes made in latest commit to address review comments:
|
@tajila I'm trying to understand the failure path for restore. We're thinking to fail if we can't startup threads on restore, something like this: if (FALSE == vm->memoryManagerFunctions->j9gc_reinitialize_for_restore(currentThread)) {
//FAIL PATH, return error message?
} This will be similar to whats done with JVM startup when initing GC components and starting threads. If the dispatcher fails to startup the threads, then an error is returned and error message is printed: gcStartupHeapManagement(J9JavaVM *javaVM)
{
...
if (!extensions->dispatcher->startUpThreads()) {
extensions->dispatcher->shutDownThreads();
result = JNI_ENOMEM;
}
if (JNI_OK != result) {
PORT_ACCESS_FROM_JAVAVM(javaVM);
extensions->getGlobalCollector()->collectorShutdown(extensions);
j9nls_printf(PORTLIB, J9NLS_ERROR, J9NLS_GC_FAILED_TO_STARTUP_GARBAGE_COLLECTOR);
return result;
} |
I suppose we can forgo failing and simply continue on with the threads in checkpoint + how many ever we were able to startup |
you can add an error message similar to the others describing what went wrong and thrown a JVMRestoreException |
It may be better to fail than to restore incorrectly. If we cant restore GC threads, theres a good chance will hit the OOM somewhere else. |
5ca2e94
to
ca718bb
Compare
I'll let @tajila handle the final review/testing/merge |
Jenkins test sanity xlinuxcriu jdk17 |
You need to rebase your changes. It is |
Integrate CRIU support with new OMR GC APIs for thread pool adjustments, contract the thread pool for checkpoint and expand it for restore. For background, see eclipse-omr/omr#6831. - Introduced j9gc_prepare_for_checkpoint and j9gc_reinitialize_for_restore APIs to consolidate GC specific routines used for checkpoint/restore Report J9NLS_GC_FAILED_TO_INSTANTIATE_TASK_DISPATCHER on j9gc_reinitialize_for_restore failure - Introduced -XX:CheckpointGCThreads= option to allow the user to tune checkpoint thread count Depends on: eclipse-omr/omr#6831 Signed-off-by: Salman Rana <salman.rana@ibm.com>
Jenkins test sanity xlinuxcriu jdk17 |
Integrate CRIU support with new OMR GC APIs for thread pool adjustments, contract the thread pool for checkpoint and expand it for restore.
For background, see eclipse-omr/omr#6831.
j9gc_prepare_for_checkpoint
andj9gc_reinitialize_for_restore
APIs to consolidate GC specific routines used for checkpoint/restoreReport
J9NLS_GC_FAILED_TO_INSTANTIATE_TASK_DISPATCHER
onj9gc_reinitialize_for_restore
failure-XX:CheckpointGCThreads=
option to allow the user to tune checkpoint thread countDepends on: eclipse-omr/omr#6831
Signed-off-by: Salman Rana salman.rana@ibm.com