RFR: 8302215: G1: Last-ditch Full GC should do serial compaction for tail regions in per thread compaction points. [v2]
Thomas Schatzl
tschatzl at openjdk.org
Wed Feb 15 15:31:47 UTC 2023
On Wed, 15 Feb 2023 15:15:21 GMT, Ivan Walulya <iwalulya at openjdk.org> wrote:
>> An alternative, similar to what Albert suggests, would be to change `move_regions_with_higher_hrm_index(...)` to `remove_above(lowest_hr, bitmap)` and when removing the regions from the compaction point store what regions were in use in a bitmap. Then you could use that bitmap to add the regions in order to the serial compaction point.
>
> Nice, that would solve the concerns I raised above.
Fwiw, I tend to prefer the `sort` call as it is least amount of code that achieves the goal well enough. All these other suggestions seem to be optimizations for little gain that need lots of extra code/helper data structures for something not (time) critical.
(I may not completely understand @albertnetymk 's suggestion: without either sorting the regions after all of them have been filtered from the worker's compaction point which involves the same sorting, or doing the sorted insertion of the regions for each worker thread's cp regions which is unlikely to be faster than the overall (quick)`sort` at the end, the suggestion does not seem to work).
-------------
PR: https://git.openjdk.org/jdk/pull/12529
More information about the hotspot-gc-dev
mailing list