RFR: JDK-8283670: gtest os.release_multi_mappings_vm is still racy
David Holmes
dholmes at openjdk.java.net
Tue Mar 29 06:00:43 UTC 2022
On Fri, 25 Mar 2022 06:01:19 GMT, Thomas Stuefe <stuefe at openjdk.org> wrote:
> [JDK-8280940](https://bugs.openjdk.java.net/browse/JDK-8280940) fixed up os.release_multi_mappings_vm to make its handling of multiple neighboring reservations less racy, but I forgot to fix up the reserve_multiple() function, which follows the same pattern and is still racy. It reserves an area, releases it, then re-reserves stripes in that area.
>
> We see intermittent problems on Linux PPC. This makes sense because we have here 64k pages, and therefore the stripe size is large, and we have a higher chance of someone grabbing that address space concurrently between the release and the stripe-wise re-reserve.
Looks good. One minor nit below.
test/hotspot/gtest/runtime/test_os.cpp line 419:
> 417: // Someone grabbed that area concurrently. Cleanup, then retry.
> 418: tty->print_cr("reserve_multiple: retry (%d)...", stripe);
> 419: if (stripe > 0) {
Nit: you don't need to check this as `carefully_release_multiple` is a no-op for `num_stripes==0`.
-------------
Marked as reviewed by dholmes (Reviewer).
PR: https://git.openjdk.java.net/jdk/pull/7953
More information about the hotspot-runtime-dev
mailing list