RFR: 8314243: Make VM_Exit::wait_for_threads_in_native_to_block wait for user threads time configurable [v2]
David Holmes
dholmes at openjdk.org
Tue Nov 14 06:06:30 UTC 2023
On Mon, 13 Nov 2023 23:31:01 GMT, Jiangli Zhou <jiangli at openjdk.org> wrote:
>> CSR: https://bugs.openjdk.org/browse/JDK-8314305
>
> Jiangli Zhou has updated the pull request incrementally with one additional commit since the last revision:
>
> Incorporate feedback/suggestion from David Holmes:
> - Change the flag to be expressed as the number of 10ms chunks (i.e. number of wait attempts) to wait.
> - Limit the max allowed wait to 10s. That's 1000 wait attempts with each attempt=10ms.
Update looks good. A couple of wording nits. Thanks.
src/hotspot/share/runtime/globals.hpp line 842:
> 840: "JVM exit. Each wait attempt is 10-millisecond. The max allowed " \
> 841: "wait attempts for user threads in native is 1000, which is " \
> 842: "10 seconds.") \
Suggestion:
The number of times to wait for user threads to stop executing native code
during JVM exit. Each wait lasts 10 milliseconds. The maximum number of waits
is 1000, to wait at most 10 seconds.
src/hotspot/share/runtime/vmOperations.cpp line 394:
> 392: // better to terminate VM when current thread is the only active thread, so
> 393: // wait for user threads too. Numbers are in 10 milliseconds.
> 394: int wait_time_per_attempt = 10; // in milliseconds
Nit: either remove extra spaces before comment, or re-align with the comment on L396.
-------------
PR Review: https://git.openjdk.org/jdk/pull/16591#pullrequestreview-1728969243
PR Review Comment: https://git.openjdk.org/jdk/pull/16591#discussion_r1392020267
PR Review Comment: https://git.openjdk.org/jdk/pull/16591#discussion_r1392021569
More information about the hotspot-runtime-dev
mailing list