RFR: Enforce max regions
Kelvin Nilsen
kdnilsen at openjdk.org
Tue Dec 6 22:41:42 UTC 2022
On Tue, 6 Dec 2022 21:43:17 GMT, William Kemper <wkemper at openjdk.org> wrote:
>> This commit enforces upper bounds on the number of ShenandoahHeapRegions affiliated with each generation. Prior to this change, enforcement of generation sizes was by usage alone. This allowed situations in which so many sparsely populated regions were affiliated with old-gen that there were insufficient FREE regions available to satisfy legitimate young-gen allocation requests. This was resulting in excessive TLAB allocation failures and degenerated collections.
>
> src/hotspot/share/gc/shenandoah/shenandoahHeapRegion.cpp line 1031:
>
>> 1029: // affiliation to OLD_GENERATION and adjust the generation-use tallies. The remnant of memory
>> 1030: // in the last humongous region that is not spanned by obj is currently not used.
>> 1031: for (size_t i = index(); i < index_limit; i++) {
>
> Do we need to worry about races here? Could we have a separate evacuating thread take a new, old region to use for PLABs _after_ we checked old available regions?
Good catch. I need to grab the heap lock for part of this code.
-------------
PR: https://git.openjdk.org/shenandoah/pull/179
More information about the shenandoah-dev
mailing list