Skip to content

Conversation

LinHu2016
Copy link
Contributor

new variable _sharedReserved in AllocateDescriptor to indicate that this allocation is related with shared reserved region.

new _allocationContextArray in SparseVirtualMemory and related methods to keep/retrieve the allocation context of off-heap related reserved heap regions.

LinHu2016 added a commit to LinHu2016/openj9 that referenced this pull request Sep 29, 2025
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]>
@LinHu2016 LinHu2016 force-pushed the defrag-offheap3_numa branch 2 times, most recently from b7cf399 to c5e4f8c Compare September 30, 2025 17:54
LinHu2016 added a commit to LinHu2016/openj9 that referenced this pull request Sep 30, 2025
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]>
@0xdaryl
Copy link
Contributor

0xdaryl commented Oct 1, 2025

@amicic @dmitripivkine : would one of you mind reviewing please?

@LinHu2016 : The commit title and commit message needs to be more descriptive please.

@0xdaryl 0xdaryl added the comp:gc label Oct 1, 2025
LinHu2016 added a commit to LinHu2016/openj9 that referenced this pull request Oct 2, 2025
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]>
LinHu2016 added a commit to LinHu2016/openj9 that referenced this pull request Oct 5, 2025
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]>
@LinHu2016 LinHu2016 force-pushed the defrag-offheap3_numa branch from 371d9e2 to c206c21 Compare October 5, 2025 21:10
new variable _sharedReserved in AllocateDescriptor to indicate that this
allocation is related with shared reserved region.

new _allocationContextArray in SparseVirtualMemory and related methods
to keep/retrieve the allocation context of off-heap related reserved
heap regions.

Signed-off-by: lhu <[email protected]>
@LinHu2016 LinHu2016 force-pushed the defrag-offheap3_numa branch from c206c21 to a6020b2 Compare October 9, 2025 20:38
LinHu2016 added a commit to LinHu2016/openj9 that referenced this pull request Oct 9, 2025
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]>
LinHu2016 added a commit to LinHu2016/openj9 that referenced this pull request Oct 10, 2025
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]>
LinHu2016 added a commit to LinHu2016/openj9 that referenced this pull request Oct 17, 2025
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]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants