RFR: 8271931: Make AbortVMOnVMOperationTimeout more resilient to OS scheduling [v4]
dholmes at openjdk.java.net
Mon Aug 9 12:24:35 UTC 2021
On Mon, 9 Aug 2021 08:37:39 GMT, Albert Mingkun Yang <ayang at openjdk.org> wrote:
>> src/hotspot/share/runtime/vmThread.cpp line 84:
>>> 82: // The two stores to `_armed` are counted in VM-op, but they should be
>>> 83: // insignificant compared to the actual VM-op duration.
>>> 84: jlong vm_op_duration = nanos_to_millis(os::javaTimeNanos() - _arm_time);
>> You could move this ahead of the store. And then you only need a small comment in arm().
> You previously commented on slack: "Also disarm before getting the end time just to shorten the race with the watcher thread". I agree with that; for non-stuck VM-ops, checking timeout on VM thread is more reliable.
Yep sorry forgot about that aspect.
More information about the hotspot-runtime-dev