openj9 icon indicating copy to clipboard operation
openj9 copied to clipboard

Defragment reserved regions for off heap Step1

Open LinHu2016 opened this issue 6 months ago • 1 comments

For off-heap enabled case, the Large size Array(larger than region size) will be allocated on sparse heap, but we still reserve leaf regions for preventing over usage on heap. Currently we have to allocate/reserve whole region for the remaining bytes(remainder of array size from region size), it potentially generate fragmentation on heap.

first step: 1, Decouple spineObject with leaf regions for off-heap enanbled case. 2, find spineObjects via SparseDataTable in recycling leaf regions. 3, use GC_HashTableIterator to get current spineObjects in doObjectInVirtualLargeObjectHeap() and pass the iterator for UnmapFromHeapObject to avoid conflict between hashTable iterator and hashTableRemove(). 4, recycle leaf regions during doObjectInVirtualLargeObjectHeap instead of during post collection(copyforward collector) or sweepProcess (global collector) for off-heap case.

#depends on https://github.com/eclipse-omr/omr/pull/7748 and https://github.com/eclipse-omr/omr/pull/7792

Signed-off-by: lhu [email protected]

LinHu2016 avatar May 07 '25 15:05 LinHu2016

should we not update scanObjectsInVirtualLargeObjectHeap path to rely on the map, too?

amicic avatar May 08 '25 17:05 amicic

have been merged with another PR

LinHu2016 avatar Sep 26 '25 17:09 LinHu2016