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 small page size/flags for Sparse Virtual Memory #7164

Merged
merged 1 commit into from
Oct 30, 2023

Conversation

dmitripivkine
Copy link
Contributor

Currently Sparse Virtual Memory uses page size Object Heap is allocated with. We want to use small pages for Sparse Heap always regardless. Also Sparse Virtual Memory uses page flags "requested" for Object Heap. This is the bug. Page flags should be paired with the page size.

Please note, that current MM_SparseVirtualMemory implementation can use double mapping instead of off-heap. This is an experimental feature never used in the code and not planned to be used. This feature uses hidden assumption that memory page size/flags should be the same for Object and Sparse heaps. This PR can break it potentially in the case memory page settings in the Object Heap and Sparse heap are different. We are going to be aware about this if we need another round of experimental testing with double mapping support.

@dmitripivkine
Copy link
Contributor Author

@amicic please review.

@dmitripivkine
Copy link
Contributor Author

@babsingh Would you please help to merge this change?
Please note:

  • changed code is not in use at the moment in the head. So, it can not break anything functionally (except compilation problems)
  • I noticed double mapping implementation code I mentioned in the comment has been removed already in off-heap prototype https://github.com/LinHu2016/omr/tree/off-heap/, just is not been delivered to the head yet.

@babsingh
Copy link
Contributor

https://github.com/eclipse/omr/blob/master/CONTRIBUTING.md#commit-guidelines

The title (first line) shouldn't end with a period: Use small page size/flags for Sparse Virtual Memory

Otherwise, the changes LGTM.

Currently Sparse Virtual Memory uses page size Object Heap is allocated
with. We want to use small pages for Sparse Heap always regardless. Also
Sparse Virtual Memory uses page flags "requested" for Object Heap. This
is the bug. Page flags should be paired with the page size.

Please note, that current MM_SparseVirtualMemory implementation can use
double mapping instead of off-heap. This is an experimental feature
never used in the code and not planned to be used. This feature uses
hidden assumption that memory page size/flags should be the same for
Object and Sparse heaps. This PR can break it potentially in the case
memory page settings in the Object Heap and Sparse heap are different.
We are going to be aware about this if we need another round of
experimental testing with double mapping support.

Signed-off-by: Dmitri Pivkine <[email protected]>
@dmitripivkine dmitripivkine changed the title Use small page size/flags for Sparse Virtual Memory. Use small page size/flags for Sparse Virtual Memory Oct 30, 2023
@dmitripivkine
Copy link
Contributor Author

https://github.com/eclipse/omr/blob/master/CONTRIBUTING.md#commit-guidelines

The title (first line) shouldn't end with a period: Use small page size/flags for Sparse Virtual Memory

Otherwise, the changes LGTM.

Sorry, fixed. Thank you!

@babsingh
Copy link
Contributor

jenkins build all

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.

Only known issues are observed, which are unrelated to this PR:

@babsingh babsingh merged commit 3739ae8 into eclipse:master Oct 30, 2023
15 of 18 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.

3 participants