-
Notifications
You must be signed in to change notification settings - Fork 721
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
Retain Continuation.vthread until the J9VMContinuation is freed #18251
Retain Continuation.vthread until the J9VMContinuation is freed #18251
Conversation
This PR is needed to enable the Skynet benchmark. The changes in eclipse-openj9#18180 pass threadObject to walkContinuationStackFrames. The GC can walk the continuations until the associated native J9VMContinuation structure is freed. Since we rely on Continuation.vthread in walkContinuationStackFrames, Continuation.vthread can only be unset once the native continuation structure is freed. Now, we set Continuation.vthread to NULL after the continuation is freed. This will prevent a segfault which can occur due to eclipse-openj9#18180. Continuation.vthread is also used in JVMTI to not suspend virtual threads once they enter the last unmount phase. This won't work anymore because Continuation.vthread is no longer set to NULL at the start of the last unmount phase. To address this issue, another continuation state has been added to indicate that a virtual thread's continuation has entered the last unmount phase. Signed-off-by: Babneet Singh <sbabneet@ca.ibm.com>
ContinuationState continuationState = J9VMJDKINTERNALVMCONTINUATION_STATE(vmThread, continuationObj);; | ||
|
||
if ((NULL != vthread) && J9_ARE_NO_BITS_SET(continuationState, J9_GC_CONTINUATION_STATE_LAST_UNMOUNT)) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@fengxue-IS This source code is in C; we can't invoke C++ code from ContinuationHelpers.hpp
here; so, I have employed a workaround.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
jenkins test sanity zlinux jdk21 |
jenkins compile win jdk21 |
Skynet is a stress benchmark, which exceeds the below 4G capacity of -Xcompressedrefs. The current workaround is to use -Xnocompressedrefs where memory can be allocated outside the 4G boundary. To run Skynet with -Xcompressedrefs, the following features will be needed: - Move unmounted continuation stacks out of the low memory area. - Improve performance of the sub-4G allocator so that it doesn't regress under high memory usage. Depends on eclipse-openj9/openj9#18251 Related: eclipse-openj9/openj9#16728 Related: eclipse-openj9/openj9#15781 Signed-off-by: Babneet Singh <sbabneet@ca.ibm.com>
Skynet is a stress benchmark, which exceeds the below 4G capacity of -Xcompressedrefs. The current workaround is to use -Xnocompressedrefs where memory can be allocated outside the 4G boundary. To run Skynet with -Xcompressedrefs, the following features will be needed: - Move unmounted continuation stacks out of the low memory area. - Improve performance of the sub-4G allocator so that it doesn't regress under high memory usage. Depends on eclipse-openj9/openj9#18251 Related: eclipse-openj9/openj9#16728 Related: eclipse-openj9/openj9#15781 Signed-off-by: Babneet Singh <sbabneet@ca.ibm.com>
Skynet is a stress benchmark, which exceeds the below 4G capacity of -Xcompressedrefs. The current workaround is to use -Xnocompressedrefs where memory can be allocated outside the 4G boundary. To run Skynet with -Xcompressedrefs, the following features will be needed: - Move unmounted continuation stacks out of the low memory area. - Improve performance of the sub-4G allocator so that it doesn't regress under high memory usage. Depends on eclipse-openj9/openj9#18251 Related: eclipse-openj9/openj9#16728 Related: eclipse-openj9/openj9#15781 Signed-off-by: Babneet Singh <sbabneet@ca.ibm.com>
Skynet is a stress benchmark, which exceeds the below 4G capacity of -Xcompressedrefs. The current workaround is to use -Xnocompressedrefs where memory can be allocated outside the 4G boundary. To run Skynet with -Xcompressedrefs, the following features will be needed: - Move unmounted continuation stacks out of the low memory area. - Improve performance of the sub-4G allocator so that it doesn't regress under high memory usage. Depends on eclipse-openj9/openj9#18251 Related: eclipse-openj9/openj9#16728 Related: eclipse-openj9/openj9#15781 Signed-off-by: Babneet Singh <sbabneet@ca.ibm.com>
Depends on eclipse-openj9/openj9#18251 Depends on ibmruntimes/openj9-openjdk-jdk21#53 Depends on ibmruntimes/openj9-openjdk-jdk#675 Signed-off-by: Babneet Singh <sbabneet@ca.ibm.com>
- Depends on eclipse-openj9/openj9#18251 - Depends on ibmruntimes/openj9-openjdk-jdk21#53 - Depends on ibmruntimes/openj9-openjdk-jdk#675 Signed-off-by: Babneet Singh <sbabneet@ca.ibm.com>
- Depends on eclipse-openj9/openj9#18251 - Depends on ibmruntimes/openj9-openjdk-jdk21#53 - Depends on ibmruntimes/openj9-openjdk-jdk#675 - Related: eclipse-openj9/openj9#16728 Signed-off-by: Babneet Singh <sbabneet@ca.ibm.com>
jenkins test sanity alinux64 jdk21 |
jenkins compile win jdk8 |
Skynet is a stress benchmark, which exceeds the below 4G capacity of -Xcompressedrefs. The current workaround is to use -Xnocompressedrefs where memory can be allocated outside the 4G boundary. To run Skynet with -Xcompressedrefs, the following features will be needed: - Move unmounted continuation stacks out of the low memory area. - Improve performance of the sub-4G allocator so that it doesn't regress under high memory usage. Depends on eclipse-openj9/openj9#18251 Related: eclipse-openj9/openj9#16728 Related: eclipse-openj9/openj9#15781 Signed-off-by: Babneet Singh <sbabneet@ca.ibm.com>
Skynet is a stress benchmark, which exceeds the below 4G capacity of -Xcompressedrefs. The current workaround is to use -Xnocompressedrefs where memory can be allocated outside the 4G boundary. To run Skynet with -Xcompressedrefs, the following features will be needed: - Move unmounted continuation stacks out of the low memory area. - Improve performance of the sub-4G allocator so that it doesn't regress under high memory usage. Depends on eclipse-openj9/openj9#18251 Related: eclipse-openj9/openj9#16728 Related: eclipse-openj9/openj9#15781 Signed-off-by: Babneet Singh <sbabneet@ca.ibm.com>
- Depends on eclipse-openj9/openj9#18251 - Depends on ibmruntimes/openj9-openjdk-jdk21#53 - Depends on ibmruntimes/openj9-openjdk-jdk#675 - Related: eclipse-openj9/openj9#16728 Signed-off-by: Babneet Singh <sbabneet@ca.ibm.com>
- Depends on eclipse-openj9/openj9#18251 - Depends on ibmruntimes/openj9-openjdk-jdk21#53 - Depends on ibmruntimes/openj9-openjdk-jdk#675 - Related: eclipse-openj9/openj9#16728 Signed-off-by: Babneet Singh <sbabneet@ca.ibm.com>
- Depends on eclipse-openj9/openj9#18251 - Depends on ibmruntimes/openj9-openjdk-jdk21#53 - Depends on ibmruntimes/openj9-openjdk-jdk#675 - Related: eclipse-openj9/openj9#16728 Signed-off-by: Babneet Singh <sbabneet@ca.ibm.com>
- Depends on eclipse-openj9/openj9#18251 - Depends on ibmruntimes/openj9-openjdk-jdk21#53 - Depends on ibmruntimes/openj9-openjdk-jdk#675 - Related: eclipse-openj9/openj9#16728 Signed-off-by: Babneet Singh <sbabneet@ca.ibm.com>
This PR is needed to enable the Skynet benchmark.
The changes in #18180 pass threadObject to
walkContinuationStackFrames.
The GC can walk the continuations until the associated native
J9VMContinuation structure is freed.
Since we rely on Continuation.vthread in walkContinuationStackFrames,
Continuation.vthread can only be unset once the native continuation
structure is freed.
Now, we set Continuation.vthread to NULL after the continuation is
freed. This will prevent a segfault which can occur due to
#18180.
Continuation.vthread is also used in JVMTI to not suspend virtual
threads once they enter the last unmount phase. This won't work anymore
because Continuation.vthread is no longer set to NULL at the start of
the last unmount phase. To address this issue, another continuation
state has been added to indicate that a virtual thread's continuation
has entered the last unmount phase.
Signed-off-by: Babneet Singh sbabneet@ca.ibm.com