RFR: Loan from old should align on region size
William Kemper
wkemper at openjdk.org
Wed Feb 1 14:39:37 UTC 2023
On Wed, 1 Feb 2023 02:57:07 GMT, Kelvin Nilsen <kdnilsen at openjdk.org> wrote:
> This fixes an error detected by a recently added assertion on a different branch. When loaning memory from old-gen to young-gen, it is important the total amount of the loan be an integral number of ShenandoahHeapRegions. The total loan represents a sum of memory loaned to support young evacuations and memory loaned to support mutator allocations made while GC is active. The sum of these two values is a multiple of region size. The previous version of the code accidentally loaned only the memory dedicated to supporting mutator allocations, which is not necessarily a multiple of the region size.
I wonder if the missing `old_bytes_loaned_for_young_evac` explains the observation that the loans were often too conservative, resulting in evacuation failures on some workloads. Is the `old_bytes_loaned_for_young_evac` always less than the size of a region? or could it cover multiple regions?
-------------
Marked as reviewed by wkemper (Committer).
PR: https://git.openjdk.org/shenandoah/pull/213
More information about the shenandoah-dev
mailing list