RFR: 8271931: Make AbortVMOnVMOperationTimeout more resilient to OS scheduling
Aleksey Shipilev
shade at openjdk.java.net
Thu Aug 5 10:30:30 UTC 2021
On Thu, 5 Aug 2021 09:47:18 GMT, Albert Mingkun Yang <ayang at openjdk.org> wrote:
> Perform VM-op timeout also on the VM thread. If a VM-op is stuck, the existing watcher-thread based machinery will kick in and detect it.
>
> Test: tier1
TBH, the decision to only check this at periodic task was to avoid excess overhead. But I don't think this concern is relevant for this patch, as it would only be entered when timeout is enabled. I do have suggestions to simplify the patch:
src/hotspot/share/runtime/vmThread.cpp line 428:
> 426: fatal("%s VM operation took too long: completed in " JLONG_FORMAT " ms (timeout: " INTX_FORMAT " ms)",
> 427: _cur_vm_operation->name(), delay, AbortVMOnVMOperationTimeoutDelay);
> 428: }
This duplicates `VMOperationTimeoutTask::task` body. So I think this is better to be moved to a separate method, e.g. `VMOperationTimeoutTask::check_and_fail`, which we can then call from both `::task` and `::disarm`.
-------------
Changes requested by shade (Reviewer).
PR: https://git.openjdk.java.net/jdk/pull/5016
More information about the hotspot-runtime-dev
mailing list