RFR: 8327097: GenShen: Align PLAB sizes down rather than up [v2]
Kelvin Nilsen
kdnilsen at openjdk.org
Tue Mar 19 13:23:35 UTC 2024
On Fri, 8 Mar 2024 00:50:30 GMT, Y. Srinivas Ramakrishna <ysr at openjdk.org> wrote:
>> We also need a comment somewhere stating why we need these to be card-aligned.
>>
>> I wonder also if this is entirely correct in itself, unless the shared allocation itself also always leaves us with a card-aligned top from which these PLABs are allocated.
>>
>> In particular, it would be good to assert that `allocate_new_plab()` always gives us back a card-aligned start address.
>>
>> Would be good to also use `align_up` or `align_down` in `allocate_new_plab()` as well. Indeed, it might be a good idea to do so in any code in Shenandoah where we are unnecessarily rolling our own custom alignment code.
>
> There's also a couple of assertion checks in `ShenandoahFreeSet::allocate_aligned_plab()` that use the modulus operation, which should probably use `is_aligned()` instead.
>
> Would be good to clean those up as well while we are taking care of this.
Thanks for these suggestions. I believe I have addressed each in the newest rev of the code.
-------------
PR Review Comment: https://git.openjdk.org/shenandoah/pull/401#discussion_r1530356387
More information about the shenandoah-dev
mailing list