Skip to content
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

Use top-down direction for heap allocation on zLinux #7344

Merged
merged 1 commit into from
May 24, 2024

Conversation

dmitripivkine
Copy link
Contributor

Current heap allocation direction for zLinux is bottom-up. The motivation for this is on Z platforms shift operation executes faster for smaller shift value. However with bottom-up direction object heap takes all available memory below 4G bar. This does not allow Suballocator to expand if necessary and might lead to OOM below 4G bar. The intention for this fix is to improve this situation. Switching to top-down increases chances that less memory below 4G bar is going to be used (but worst case scenario still be the same as now). In order to keep smaller shift performance benefit an allocation shift scheme should stay 0-1-2-3-4. All other platforms still use 0-3-4. The behaviour for all other platforms has not been changed.

@dmitripivkine
Copy link
Contributor Author

Object heap allocation logic for zLinux running with Concurrent Scavenger with HW support (Guarded Storage) has not been changed by this PR and still use bottom-up direction.

@dmitripivkine
Copy link
Contributor Author

@amicic Would you please review?

@dmitripivkine
Copy link
Contributor Author

@vijaysun-omr @joransiu @r30shah FYI

gc/base/MemoryManager.cpp Outdated Show resolved Hide resolved
gc/base/MemoryManager.cpp Outdated Show resolved Hide resolved
@amicic
Copy link
Contributor

amicic commented May 23, 2024

looks good to me
for a couple code style suggestions, I'll let @babsingh to voice his opinion too

gc/base/MemoryManager.cpp Outdated Show resolved Hide resolved
@dmitripivkine
Copy link
Contributor Author

Correspondent issue: eclipse-openj9/openj9#19490

Copy link
Contributor

@babsingh babsingh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

minor formatting nits

gc/base/MemoryManager.cpp Outdated Show resolved Hide resolved
gc/base/MemoryManager.cpp Outdated Show resolved Hide resolved
gc/base/MemoryManager.cpp Outdated Show resolved Hide resolved
gc/base/MemoryManager.cpp Outdated Show resolved Hide resolved
Current heap allocation direction for zLinux is bottom-up. The
motivation for this is on Z platforms shift operation executes faster
for smaller shift value. However with bottom-up direction object heap
takes all available memory below 4G bar. This does not allow
Suballocator to expand if necessary and might lead to OOM below 4G bar.
The intention for this fix is to improve this situation. Switching to
top-down increases chances that less memory below 4G bar is going to be
used (but worst case scenario still be the same as now).
In order to keep smaller shift performance benefit an allocation shift
scheme should stay 0-1-2-3-4. All other platforms still use 0-3-4.
Heap allocation logic for Concurrent Scavenger with HW support (Guarded
Storage) hasn't been changed and still be bottom-up.
The behaviour for all other platforms hasn't been changed.

Signed-off-by: Dmitri Pivkine <Dmitri_Pivkine@ca.ibm.com>
@babsingh
Copy link
Contributor

jenkins build all

@babsingh babsingh merged commit 01374a4 into eclipse:master May 24, 2024
17 checks passed
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.

None yet

3 participants