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

SCC: Page size support in container environments #19968

Closed
tajila opened this issue Aug 6, 2024 · 5 comments · Fixed by #19972
Closed

SCC: Page size support in container environments #19968

tajila opened this issue Aug 6, 2024 · 5 comments · Fixed by #19972
Assignees
Labels

Comments

@tajila
Copy link
Contributor

tajila commented Aug 6, 2024

Currently in container environments J9 creates a read only SCC. Each SCC records the page size of the environment that it was originally built in. On JVM startup during SCC initialization the recorded page size in the SCC is checked to see if it matches the current executing environment, if it does not then an SCC failure is emitted. In container environments if the JVM is started with -Xshareclasses:nonfatal then the JVM will startup without the SCC, otherwise the JVM fails to start. This issue limits the portability of container images as the page sizes much match.

In some cases a change in page size can be allowed. For example if the SCC is build in an environment with a higher page size, it should be allowed to be run in an environment with a smaller page size (so long as its a multiple).

Goal:
Introduce a new options :strictPageSize and :nonStrictPageSize that allows for flexibility in page sizes. In container environments :nonStrictPageSize should be default.

@tajila
Copy link
Contributor Author

tajila commented Aug 6, 2024

@hangshao0 Feel free to correct anything that you feel is inaccurate. Also, feel free to change the option names. I think there should be a way to enable/disable the new behaviour for debugging purposes.

@tajila
Copy link
Contributor Author

tajila commented Aug 6, 2024

FYI @pshipton

hangshao0 added a commit to hangshao0/openj9 that referenced this issue Aug 7, 2024
The page level operation in SCC are msync and mprotect.
msync is only used on z/OS, we can always do msync if we can have valid
_osPageSize.
For mprotect, it is turned off if the SCC is readonly. If the data is
not paged aligned anymore, mprotect should be also be turned off. There
is no need to force consistent memory page size anymore.

Fixes eclipse-openj9#19968

Signed-off-by: Hang Shao <[email protected]>
hangshao0 added a commit to hangshao0/openj9 that referenced this issue Aug 7, 2024
The page level operation in SCC are msync and mprotect.
msync is only used on z/OS, we can always do msync if we can have valid
_osPageSize.
For mprotect, it is turned off if the SCC is readonly. If the data is
not paged aligned anymore, mprotect should be also be turned off. There
is no need to force consistent memory page size anymore.

Fixes eclipse-openj9#19968

Signed-off-by: Hang Shao <[email protected]>
hangshao0 added a commit to hangshao0/openj9 that referenced this issue Aug 7, 2024
The page level operation in SCC are msync and mprotect.
msync is only used on z/OS, we can always do msync if we can have valid
_osPageSize.
For mprotect, it is turned off if the SCC is readonly. If the data is
not paged aligned anymore, mprotect should be also be turned off. There
is no need to force consistent memory page size anymore.

Fixes eclipse-openj9#19968

Signed-off-by: Hang Shao <[email protected]>
@hangshao0
Copy link
Contributor

Actually we can do better. #19972 removes the requirement of consistent page size in SCC. The page level operations in SCC are msync and mprotec. msync is only used on z/OS, I won't worry about it. There is no need to do mprotect if the SCC is readonly. If the data is not page aligned, we cannot do mprotect anymore, and it should be turned off.

hangshao0 added a commit to hangshao0/openj9 that referenced this issue Aug 7, 2024
The page level operation in SCC are msync and mprotect.
msync is only used on z/OS, we can always do msync if we can have valid
_osPageSize.
For mprotect, it is turned off if the SCC is readonly. If the data is
not paged aligned anymore, mprotect should be also be turned off. There
is no need to force consistent memory page size anymore.

Fixes eclipse-openj9#19968

Signed-off-by: Hang Shao <[email protected]>
hangshao0 added a commit to hangshao0/openj9 that referenced this issue Aug 7, 2024
The page level operation in SCC are msync and mprotect.
msync is only used on z/OS, we can always do msync if we can have valid
_osPageSize.
For mprotect, it is turned off if the SCC is readonly. If the data is
not paged aligned anymore, mprotect should be also be turned off. There
is no need to force consistent memory page size anymore.

Fixes eclipse-openj9#19968

Signed-off-by: Hang Shao <[email protected]>
hangshao0 added a commit to hangshao0/openj9 that referenced this issue Aug 21, 2024
The page level operation in SCC are msync and mprotect.
msync is only used on z/OS, we can always do msync if we can have valid
_osPageSize.
For mprotect, it is turned off if the SCC is readonly. If the data is
not paged aligned anymore, mprotect should be also be turned off. There
is no need to force consistent memory page size anymore.

Fixes eclipse-openj9#19968

Signed-off-by: Hang Shao <[email protected]>
hangshao0 added a commit to hangshao0/openj9 that referenced this issue Sep 4, 2024
The page level operation in SCC are msync and mprotect.
msync is only used on z/OS, we can always do msync if we can have valid
_osPageSize.
For mprotect, it is turned off if the SCC is readonly. If the data is
not paged aligned anymore, mprotect should be also be turned off. There
is no need to force consistent memory page size anymore.

Fixes eclipse-openj9#19968

Signed-off-by: Hang Shao <[email protected]>
hangshao0 added a commit to hangshao0/openj9 that referenced this issue Sep 5, 2024
1. The page level operation in SCC are msync and mprotect.
msync is only used on z/OS, we can always do msync if we can have valid
_osPageSize. For mprotect, it is turned off if the SCC is readonly. If
the data is not paged aligned anymore, mprotect should be also be turned
off. There is no need to force consistent memory page size anymore.

2. Add new test flags and command line test cases.

3. Add top layer page size infomation in cache stats

4. Add page size info into javacore

Fixes eclipse-openj9#19968

Signed-off-by: Hang Shao <[email protected]>
hangshao0 added a commit to hangshao0/openj9 that referenced this issue Sep 5, 2024
1. The page level operation in SCC are msync and mprotect.
msync is only used on z/OS, we can always do msync if we can have valid
_osPageSize. For mprotect, it is turned off if the SCC is readonly. If
the data is not paged aligned anymore, mprotect should be also be turned
off. There is no need to force consistent memory page size anymore.

2. Add new test flags and command line test cases.

3. Add top layer page size infomation in cache stats

4. Add page size info into javacore

Fixes eclipse-openj9#19968

Signed-off-by: Hang Shao <[email protected]>
hangshao0 added a commit to hangshao0/openj9 that referenced this issue Sep 5, 2024
1. The page level operation in SCC are msync and mprotect.
msync is only used on z/OS, we can always do msync if we can have valid
_osPageSize. For mprotect, it is turned off if the SCC is readonly. If
the data is not paged aligned anymore, mprotect should be also be turned
off. There is no need to force consistent memory page size anymore.

2. Add new test flags and command line test cases.

3. Add top layer page size infomation in cache stats

4. Add page size info into javacore

Fixes eclipse-openj9#19968

Signed-off-by: Hang Shao <[email protected]>
hangshao0 added a commit to hangshao0/openj9 that referenced this issue Sep 5, 2024
1. The page level operation in SCC are msync and mprotect.
msync is only used on z/OS, we can always do msync if we can have valid
_osPageSize. For mprotect, it is turned off if the SCC is readonly. If
the data is not paged aligned anymore, mprotect should be also be turned
off. There is no need to force consistent memory page size anymore.

2. Add new test flags and command line test cases.

3. Add top layer page size infomation in cache stats

4. Add page size info into javacore

Fixes eclipse-openj9#19968

Signed-off-by: Hang Shao <[email protected]>
hangshao0 added a commit to hangshao0/openj9 that referenced this issue Sep 5, 2024
1. The page level operation in SCC are msync and mprotect. msync is only
used on z/OS for persistent cache, we can always do msync if we have a
valid _osPageSize. For mprotect, it is turned off if the SCC is
readonly. If the data is not paged aligned anymore, mprotect should be
also be turned off. There is no need to force consistent memory page
size between cold and warn runs anymore.

2. Add new test flags and command line test cases.

3. Add top layer page size infomation in cache stats.

4. Add page size info into javacore.

Fixes eclipse-openj9#19968

Signed-off-by: Hang Shao <[email protected]>
hangshao0 added a commit to hangshao0/openj9 that referenced this issue Sep 5, 2024
1. The page level operation in SCC are msync and mprotect. msync is only
used on z/OS for persistent cache, we can always do msync if we have a
valid _osPageSize. For mprotect, it is turned off if the SCC is
readonly. If the data is not paged aligned anymore, mprotect should be
also be turned off. There is no need to force consistent memory page
size between cold and warn runs anymore.

2. Add new test flags and command line test cases.

3. Add top layer page size infomation in cache stats.

4. Add page size info into javacore.

Fixes eclipse-openj9#19968

Signed-off-by: Hang Shao <[email protected]>
hangshao0 added a commit to hangshao0/openj9 that referenced this issue Sep 10, 2024
1. The page level operation in SCC are msync and mprotect. msync is only
used on z/OS for persistent cache, we can always do msync if we have a
valid _osPageSize. For mprotect, it is turned off if the SCC is
readonly. If the data is not paged aligned anymore, mprotect should be
also be turned off. There is no need to force consistent memory page
size between cold and warn runs anymore.

2. Add new test flags and command line test cases.

3. Add top layer page size infomation in cache stats.

4. Add page size info into javacore.

Fixes eclipse-openj9#19968

Signed-off-by: Hang Shao <[email protected]>
hangshao0 added a commit to hangshao0/openj9 that referenced this issue Sep 11, 2024
1. The page level operation in SCC are msync and mprotect. msync is only
used on z/OS for persistent cache, we can always do msync if we have a
valid _osPageSize. For mprotect, it is turned off if the SCC is
readonly. If the data is not paged aligned anymore, mprotect should be
also be turned off. There is no need to force consistent memory page
size between cold and warn runs anymore.

2. Add new test flags and command line test cases.

3. Add top layer page size infomation in cache stats.

4. Add page size info into javacore.

Fixes eclipse-openj9#19968

Signed-off-by: Hang Shao <[email protected]>
hangshao0 added a commit to hangshao0/openj9 that referenced this issue Sep 11, 2024
1. The page level operation in SCC are msync and mprotect. msync is only
used on z/OS for persistent cache, we can always do msync if we have a
valid _osPageSize. For mprotect, it is turned off if the SCC is
readonly. If the data is not paged aligned anymore, mprotect should be
also be turned off. There is no need to force consistent memory page
size between cold and warn runs anymore.

2. Add new test flags and command line test cases.

3. Add top layer page size infomation in cache stats.

4. Add page size info into javacore.

Fixes eclipse-openj9#19968

Signed-off-by: Hang Shao <[email protected]>
hangshao0 added a commit to hangshao0/openj9 that referenced this issue Sep 11, 2024
1. The page level operation in SCC are msync and mprotect. msync is only
used on z/OS for persistent cache, we can always do msync if we have a
valid _osPageSize. For mprotect, it is turned off if the SCC is
readonly. If the data is not paged aligned anymore, mprotect should be
also be turned off. There is no need to force consistent memory page
size between cold and warn runs anymore.

2. Add new test flags and command line test cases.

3. Add top layer page size infomation in cache stats.

4. Add page size info into javacore.

Fixes eclipse-openj9#19968

Signed-off-by: Hang Shao <[email protected]>
@babsingh
Copy link
Contributor

@hangshao0 For 0.48, this issue will need to be resolved by the end of this week. What's the current state of this issue? Based on this issue's impact, do we need it to be fixed in 0.48 or can it be pushed to 0.49?

@hangshao0
Copy link
Contributor

This issue can be fixed by #19972, which is ready to be reviewed.

hangshao0 added a commit to hangshao0/openj9 that referenced this issue Sep 17, 2024
1. The page level operation in SCC are msync and mprotect. msync is only
used on z/OS for persistent cache, we can always do msync if we have a
valid _osPageSize. For mprotect, it is turned off if the SCC is
readonly. If the data is not paged aligned anymore, mprotect should be
also be turned off. There is no need to force consistent memory page
size between cold and warn runs anymore.

2. Add new test flags and command line test cases.

3. Add top layer page size infomation in cache stats.

4. Add page size info into javacore.

Fixes eclipse-openj9#19968

Signed-off-by: Hang Shao <[email protected]>
hangshao0 added a commit to hangshao0/openj9 that referenced this issue Sep 17, 2024
1. The page level operation in SCC are msync and mprotect. msync is only
used on z/OS for persistent cache, we can always do msync if we have a
valid _osPageSize. For mprotect, it is turned off if the SCC is
readonly. If the data is not paged aligned anymore, mprotect should be
also be turned off. There is no need to force consistent memory page
size between cold and warn runs anymore.

2. Add new test flags and command line test cases.

3. Add top layer page size infomation in cache stats.

4. Add page size info into javacore.

Fixes eclipse-openj9#19968

Signed-off-by: Hang Shao <[email protected]>
hangshao0 added a commit to hangshao0/openj9 that referenced this issue Sep 18, 2024
1. The page level operation in SCC are msync and mprotect. msync is only
used on z/OS for persistent cache, we can always do msync if we have a
valid _osPageSize. For mprotect, it is turned off if the SCC is
readonly. If the data is not paged aligned anymore, mprotect should be
also be turned off. There is no need to force consistent memory page
size between cold and warn runs anymore.

2. Add new test flags and command line test cases.

3. Add top layer page size infomation in cache stats.

4. Add page size info into javacore.

Fixes eclipse-openj9#19968

Signed-off-by: Hang Shao <[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 a pull request may close this issue.

3 participants