RFR: 8344831: [REDO] CDS: Parallel relocation [v2]
Aleksey Shipilev
shade at openjdk.org
Wed Nov 27 09:01:21 UTC 2024
On Wed, 27 Nov 2024 05:51:54 GMT, David Holmes <dholmes at openjdk.org> wrote:
> But that last worker is still inside the code in `signal` and it will depend on how the low-level semaphore implementation is written as to whether that thread will be able to safely complete execution of that code.
Right, what a headache. One of my experiments had the end semaphore replaced by a spin-wait. It did burn too much CPU cycles to be useful.
I think we can do a two-stage shutdown: first a semaphore (provides good behavior when workers are lagging behind), and then a spin-wait for all workers to leave the dangerous piece of code (provides safety for semaphore shutdown). See for example new commit. That should conceptually resolve the lifecycle problem, correct? It still performs well on startup tests.
-------------
PR Comment: https://git.openjdk.org/jdk/pull/22369#issuecomment-2503288732
More information about the hotspot-runtime-dev
mailing list