RFR: 8341334: CDS: Parallel relocation [v11]

Claes Redestad redestad at openjdk.org
Thu Nov 7 13:57:46 UTC 2024


On Thu, 7 Nov 2024 09:10:26 GMT, Aleksey Shipilev <shade at openjdk.org> wrote:

>> src/hotspot/share/cds/archiveUtils.cpp line 444:
>> 
>>> 442: }
>>> 443: 
>>> 444: void ArchiveWorkers::start_worker_if_needed() {
>> 
>> Not sure it matters, but when `_started_workers` is or becomes equal to `_num_workers` we could pass that bit of information on to avoid calling `start_worker_if_needed`. Might avoid a possible burst of contended reads.
>
> I don't think matters. The contention on `_started_workers` is transient, as once we hit `_num_workers`, no updates happen to `_started_workers` anymore.

Sure, probably inconsequential.

I wonder if having a bit more control on the number of threads created and how we spin them up might be interesting tuning flags, e.g. to opt-in to use more threads as archives grow larger. The diagnostic flag to opt-out looks good and is probably sufficient for now.

-------------

PR Review Comment: https://git.openjdk.org/jdk/pull/21302#discussion_r1832723417


More information about the hotspot-runtime-dev mailing list