RFR: 8372861: Genshen: Override parallel_region_stride of ShenandoahResetBitmapClosure to a reasonable value for better parallelism [v2]
Xiaolong Peng
xpeng at openjdk.org
Wed Dec 3 16:23:32 UTC 2025
On Wed, 3 Dec 2025 10:10:45 GMT, Aleksey Shipilev <shade at openjdk.org> wrote:
>> Xiaolong Peng has updated the pull request incrementally with one additional commit since the last revision:
>>
>> Add more comments.
>
> src/hotspot/share/gc/shenandoah/shenandoahGeneration.cpp line 88:
>
>> 86: // Using a smaller value here yields better task distribution for a lumpy workload. The task will be split
>> 87: // into smaller batches with 8 regions in batch, the worker processes more regions w/o needs to reset bitmaps
>> 88: // will process more batches, but overall all workers will be saturated throughout the whole concurrent reset phase.
>
> I have a very general comment about writing comments like this one. This entire block of prose is really excessive, is set up to be outdated (are you tracking the real behavior of `SH::parallel_heap_region_iterate` and its magical `4096`?), and can be boiled down to much more succinct:
>
>
> Bitmap reset task is heavy-weight and benefits from much smaller tasks than the default.
Thanks a lot! I have updated the PR to use the succinct one you suggested.
> src/hotspot/share/gc/shenandoah/shenandoahHeap.hpp line 119:
>
>> 117: // ShenandoahHeap::parallel_heap_region_iterate will derive a reasonable value based
>> 118: // on active worker threads and number of regions.
>> 119: // For some lumpy workload, the value can be overridden for better task distribution.
>
> Again, excessive. You can just drop the comment; its purpose is obvious from the code.
Done.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/28613#discussion_r2585783241
PR Review Comment: https://git.openjdk.org/jdk/pull/28613#discussion_r2585784611
More information about the shenandoah-dev
mailing list