-
Notifications
You must be signed in to change notification settings - Fork 729
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
Fix code cache allocation with large pages enabled #18342
Conversation
On a machine with 2M large page size, will output the following in the verbose output:
The output of the memory usage for JIT Code cache is:
In order to do this test I removed the lines which imposes a 2MB minimum on the code cache total size: openj9/runtime/compiler/control/J9Options.cpp Lines 1696 to 1697 in 06c3abc
Next Action: Test on a machine with 1GB huge page size. |
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.
See the inline comments
For me this PR does not build locally.
It's possible that there is a mismatch between this openj9 code and the omr one. |
The code works at least when 4KB and 1GB pages are available. |
76f5e42
to
9ed2d87
Compare
@mpirvu Its great you are able to test this. I have rebased my work. |
Since not many people have verbose logs enabled, I think we should also add a trace point for this rare case (basically under the same conditions the verbose line is printed). |
I cannot get both 2MB and 1GB large pages enabled on the system. It's either one or the other. |
c10b899
to
749017d
Compare
749017d
to
5c57394
Compare
5c57394
to
1e79576
Compare
When large pages/huge pages are enabled and page size >= 1GB, code cache size is rounded up to the page size. When codecachetotal is lesser than the page size, this can make the size of code cache segment bigger than the total code cache size. In this case, page size should be recalculated to a smaller value. Also a warning message should be printed in the verbose output. Closes: #eclipse-openj9#18274 Signed-off-by: SajinaKandy <[email protected]>
1e79576
to
040228e
Compare
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.
LGTM
jenkins compile all jdk21 |
jenkins compile alinux64 jdk21 |
jenkins test sanity zlinux jdk17 |
@SajinaKandy don't forget to create an issue at https://github.com/eclipse-openj9/openj9-docs to describe the change in behavior when large pages are used. |
@mpirvu Raised the doc issue: eclipse-openj9/openj9-docs#1206 |
Code cache allocation sizes are calculated and rounded up to the page size available on the system. When large pages/huge pages are enabled, and page size >= 1GB, this can cause the code cache size calculation to go wrong.
When codecachetotal is lesser than the page size, it makes the size of code cache segment bigger than the total code cache size (default 256MB for a 64-bit VM).
If large pages are enabled, page size should be recalculated to a smaller value if required. Also a warning message should be printed in the verbose output.
Closes: ##18274