RFR: 8344831: [REDO] CDS: Parallel relocation [v4]
Aleksey Shipilev
shade at openjdk.org
Fri Nov 29 10:35:58 UTC 2024
On Fri, 29 Nov 2024 09:25:25 GMT, Thomas Stuefe <stuefe at openjdk.org> wrote:
>> Aleksey Shipilev has updated the pull request incrementally with one additional commit since the last revision:
>>
>> Atomicity improvements
>
> src/hotspot/share/cds/archiveUtils.cpp line 434:
>
>> 432: }
>> 433: if (Atomic::cmpxchg(&_started_workers, cur, cur + 1, memory_order_relaxed) == cur) {
>> 434: new ArchiveWorkerThread(this);
>
> Okay, we now just leak the thread objects. That is intentional?
>
> I guess it has to be; otherwise thread invoking the ArchiveWorkers destructor would race the last worker threads finishing their runs?
Thread leak is not intentional. But we cannot in fact asynchronously delete the threads. The thread has to delete itself, apparently! I'll discuss in the high level comment.
> test/hotspot/gtest/cds/test_archiveWorkers.cpp line 43:
>
>> 41: };
>> 42:
>> 43: // Test a repeated cycle of pool start works.
>
> This does not do what the comment says. ArchiveWorkers ctor is a noop.
Fixed.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/22369#discussion_r1863310188
PR Review Comment: https://git.openjdk.org/jdk/pull/22369#discussion_r1863307263
More information about the hotspot-runtime-dev
mailing list