RFR: 8256265: G1: Improve parallelism in regions that failed evacuation [v7]
Thomas Schatzl
tschatzl at openjdk.java.net
Fri Feb 18 15:04:54 UTC 2022
On Fri, 18 Feb 2022 12:06:08 GMT, Hamlin Li <mli at openjdk.org> wrote:
> > I agree it is unnecessary to slice up the work into too many work units. One option is to determine the number of chunks per region depending on the number of failed regions and the number of threads. E.g. so that the target number of chunks in total is some (small) multiple of the number of threads.
> > Something like `ChunksPerRegion = next_log_2(#threads-actually-launched * 10 / #regions-retained)` maybe?
> > That `10` is just some random value (I also hope I got the formula right) but I think you get the idea.
> > Note that this is a bit of a circular calculation, as the #threads is sort-of determined by the number of regions... :D Maybe set the number of threads started at most (`worker_cost()`) at most to some small multiple of the number of regions retained (which is already done, but I'd probably bump that a bit, but idk).
>
> Thanks Thomas for the detailed review. :) I've updated the patch with most of your comments, except how to calculate the chunk num. I think the way you suggested is great, I will do some test, and push it in another commit, or maybe in another PR? I can do it in either way. In either way, I think G1EvacuationFailureHeapRegionChunkNum will be removed before push this PR, it's here just for development convenience.
I would prefer including this chunk sizing heuristic in this PR.
Thanks,
Thomas
-------------
PR: https://git.openjdk.java.net/jdk/pull/7047
More information about the hotspot-gc-dev
mailing list