-
Notifications
You must be signed in to change notification settings - Fork 771
Handling multiple reserved region lists for numa off-heap case #22694
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
Open
LinHu2016
wants to merge
4
commits into
eclipse-openj9:master
Choose a base branch
from
LinHu2016:defrag-offheap3_numa
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
dd8b5ac
to
041c220
Compare
amicic
reviewed
Oct 1, 2025
*/ | ||
MM_AllocationContextTarok *commonContext = (MM_AllocationContextTarok *)env->getCommonAllocationContext(); | ||
if (this != commonContext) { | ||
MM_AllocationContextTarok *context = this; |
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 could be of type MM_AllocationContextBalanced
then this could cast directly with MM_AllocationContextBalanced:
context = (MM_AllocationContextTarok *)env->getCommonAllocationContext();
and there is no need for a cast at a few other places later
1d3fd91
to
4505844
Compare
6ffca10
to
f9e5f46
Compare
In PR eclipse-openj9#22116 and eclipse-openj9#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(). Signed-off-by: lhu <[email protected]>
Change-Id: Ia3b016fca0c3b1faad9d75617d7ab208aafadb3b Signed-off-by: lhu <[email protected]>
This reverts commit dd8cf24. Change-Id: Id3d1c9176a18dc2e0a7ac35573b17510e25b9dea
f9e5f46
to
59e5d91
Compare
Signed-off-by: lhu <[email protected]>
59e5d91
to
9fc159c
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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