-
Notifications
You must be signed in to change notification settings - Fork 751
WIP:Defragment reserved regions for off heap Step1 #21817
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
should we not update scanObjectsInVirtualLargeObjectHeap path to rely on the map, too? |
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 eanbled case. 2, find spineObjects via SparseDataTable in recycling leaf regions. Signed-off-by: lhu <linhu@ca.ibm.com>
runtime/gc_base/RootScanner.cpp
Outdated
doObjectInVirtualLargeObjectHeap(spineObject, NULL); | ||
sparseDataEntry = (MM_SparseDataTableEntry *)hashTableNextDo(&walkState); | ||
} | ||
} else { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this whole method is offheap specific - the else case should not exist anymore
} | ||
sparseDataEntry = (MM_SparseDataTableEntry *)hashTableNextDo(&walkState); | ||
} | ||
while ((arrayletLeafCount > 0) && (NULL != (region = regionIterator.nextRegion()))) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Perhaps good for the first cut, but this should be more efficient. All arraylet regions should be connected into a list, so finding the regions to recycle would be immediate. A similar list is already created with addToArrayletLeafList, but there are multiple of them, and they are local to the array object. We just need one single list for the whole heap (possibly AllocationContext), but it has to be thread safe.
089ad39
to
57dda2a
Compare
3730241
to
736c92b
Compare
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 eanbled case.
2, find spineObjects via SparseDataTable in recycling leaf regions.
#depends on eclipse-omr/omr#7748