Handling multiple reserved region lists for numa off-heap case #22694
Add this suggestion to a batch that can be applied as a single commit. This suggestion is invalid because no changes were made to the code. Suggestions cannot be applied while the pull request is closed. Suggestions cannot be applied while viewing a subset of changes. Only one suggestion per line can be applied in a batch. Add this suggestion to a batch that can be applied as a single commit. Applying suggestions on deleted lines is not supported. You must change the existing code in this line in order to create a valid suggestion. Outdated suggestions cannot be applied. This suggestion has been applied or marked resolved. Suggestions cannot be applied from pending reviews. Suggestions cannot be applied on multi-line comments. Suggestions cannot be applied while the pull request is queued to merge. Suggestion cannot be applied right now. Please check back later.
In PR #22116 and #22546, _arrayReservedRegionList and _sharedArrayReservedRegionsBytesUsed has been introduced to share fraction of reserved regions. _arrayReservedRegionList is set in commonAllocationContext(single global list), For numa case, the reserved regions for large array could be allocated from different allocation context(allocation context per numa node and in case there is no free region for the numa note, it could borrow from neighbor numa node). during recycling, there are no extra information indicate which reserved regions are for recycling off-heap array, so potentially it might cause imbalance free memory among numa notes, then affect runtime performance in some cases.
Undate to manage reserved region list per allocation context(numa note) to avoid imbalance free memory caused by reserved regions.
1, for reducing complexity, shared fraction reserved regions still be managed in _arrayReservedRegionList of commom context. set _sharedReserved in AllocateDescriptor for shared fraction reserved region allocation.
2, new _allocationContextArray in SparseVirtualMemory(omr PR eclipse-omr/omr#7956) to store/retrieve allocation context for the reserved regions of large array.
3, handle allocation failure during getSparseAddressAndDecommitLeaves().
#depend: eclipse-omr/omr#7956