RFR: 8327097: GenShen: Align PLAB sizes down rather than up

Y. Srinivas Ramakrishna ysr at openjdk.org
Wed Mar 6 20:46:04 UTC 2024


On Mon, 26 Feb 2024 21:27:37 GMT, Kelvin Nilsen <kdnilsen at openjdk.org> wrote:

> When adjusting LAB sizes, round down rather than rounding up.  Otherwise, we may violate the ShenandoahHumongousThreshold bound.

src/hotspot/share/gc/shenandoah/shenandoahHeap.cpp line 1114:

> 1112:   future_size = MIN2(future_size, PLAB::max_size());
> 1113:   future_size = MAX2(future_size, PLAB::min_size());
> 1114:   future_size = align_down(future_size, CardTable::card_size_in_words());

Can one use cardsize-aligned min and max sizes (taking whetever PLAB gives us, may be by using a ShenandoahPLAB subclass). We then first align future_size up wrt card size, then floor/clamp it with the already cardsize-aligned min and max?

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

PR Review Comment: https://git.openjdk.org/shenandoah/pull/401#discussion_r1515130844


More information about the shenandoah-dev mailing list