forked from eclipse-openj9/openj9
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Prevent requesting exclusive, if already acquired
This is to prevent requestExclusiveVMAccessMetronomeTemp (used from alarm thread) from blocking if exclusive VM access is already requested prior to calling a system GC. This prevention (synchronizeRequestsFromExternalThread) already works for plain exclusive, but not if safePoint is acquired (since it does not set exclusiveAccessState to J9_XACCESS_EXCLUSIVE). While proper solution might be around fixing synchronizeRequestsFromExternalThread to account for safePointState and how exclusiveAccessState is changed during safePoint acquire, it would require more time to get it right. This solution is a workaround where there is an additional flag that is to be set by after safePoint is acquired and before GC is invoked. That flag will be checked by requestExclusiveVMAccessMetronomeTemp before actually proceeding with the request. There should be no timing hole where requestExclusiveVMAccessMetronomeTemp is called after safe point is acquired and the flag is set, since requestExclusiveVMAccessMetronomeTemp itself cannot be invoked if GC is not in progress (and indeed system GC has not been triggered yet). Signed-off-by: Aleksandar Micic <[email protected]>
- Loading branch information
Aleksandar Micic
authored and
Aleksandar Micic
committed
Dec 14, 2023
1 parent
fe20d7a
commit 76062ef
Showing
3 changed files
with
33 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters