8000 Remove Hard-Coded Restrictions to CodeCache Page Sizes on P by luke-li-2003 · Pull Request #7795 · eclipse-omr/omr · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Remove Hard-Coded Restrictions to CodeCache Page Sizes on P #7795

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

Merged
merged 1 commit into from
Jun 19, 2025

Conversation

luke-li-2003
Copy link
Contributor

Instead of only accepting 64K and 16M as valid page sizes, accept any page size matching the valid size list from the OS.

Except for 32-bit archs where 16M will only be enabled along with consolidatedCodeCache to save on address space.

Instead of only accepting 64K and 16M as valid page sizes, accept
any page size matching the valid size list from the OS.

Except for 32-bit archs where 16M will only be enabled along
with consolidatedCodeCache to save on address space.

Signed-off-by: Luke Li <luke.li@ibm.com>
@luke-li-2003 luke-li-2003 requested a review from babsingh as a code owner June 12, 2025 20:10
@luke-li-2003
Copy link
Contributor Author

Running on pLinux with a HugePageSize of 2M, we used to have:

JVMJITM034I Large page size 2M is not a supported page size for the JIT codecache; using 64K instead

But now there will be no error message.

@luke-li-2003
Copy link
Contributor Author

FYI @zl-wang

@luke-li-2003
Copy link
Contributor Author

@luke-li-2003
Copy link
10000
Contributor Author

See also eclipse-openj9/openj9#22086

Copy link
Contributor
@zl-wang zl-wang left a comment

Choose a reason for hiding this comment

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

since my comments are all only applicable to 32bit which only IBM-JDK8 still needs, probably it is not worth of modifying for technical-debt purpose. @dsouzai for a 2nd opinion and for his review/approve/merge anyway.

|| (SIXTY_FOUR_K == validPageSize)
|| (SIXTEEN_M == validPageSize)
#else
#if !defined(OMR_ENV_DATA64)
BOOLEAN codeCacheConsolidationEnabled = FALSE;
Copy link
Contributor

Choose a reason for hiding this comment

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

this modification looks fine to me, since i am hesitating if we want to poke the 800-pound gorilla at this point. i did observe some inconsistent logic (intention rather, due to legacy code) re codeCacheConsolidation enablement:
here, we check for: env variable TR_ppcCodeCacheConsolidationEnabled
JIT side: we either check for env variable TR_CodeCacheConsolidation or OMR option TR_EnableCodeCacheConsolidation

as it is, probably nobody knows how to navigate these layers of checking web without reading the code.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Can one env variable enable another env variable in the front end? If not, does that mean the user must always set all three envs for the code to work?

Copy link
Contributor

Choose a reason for hiding this comment

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

two will do: 1) set two env var; or 2) set this one env var and set the option

Copy link
Contributor

Choose a reason for hiding this comment

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

the option is set by default for 64bit though, but this env var is not applicable to 64bit anyway

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Do I need to change anything on this front then? Or is it fine to leave it as-is?

Copy link
Contributor

Choose a reason for hiding this comment

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

leave it as it is for now. upon @dsouzai review, let's see if he wants to do something about this 32bit technical-debt area.

Copy link
Contributor

Choose a reason for hiding this comment

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

another corner-case is (for 64bit): TR_DisableCodeCacheConsolidation + largePage request, it will take up a segment (256MB) virtual space for every codeCache allocation on AIX. but that is existing as it is.

Copy link
Contributor

Choose a reason for hiding this comment

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

I think we leave the technical-debt cleanup for another PR. The current PR does what it describes; doing more will complicate matters. Best to just open an issue to track this so that the inevitable subjective discussions that happen when the cleanup occurs can happen elsewhere.

/* Check if the TR_ppcCodeCacheConsolidationEnabled env variable is set.
* TR_ppcCodeCacheConsolidationEnabled is a manually set env variable used to indicate
* that Code Cache Consolidation is enabled in the JIT.
*/
BOOLEAN codeCacheConsolidationEnabled = FALSE;

if (OMRPORT_VMEM_MEMORY_MODE_EXECUTE == (OMRPORT_VMEM_MEMORY_MODE_EXECUTE & mode)) {
if (portLibrary->sysinfo_get_env(portLibrary, "TR_ppcCodeCacheConsolidationEnabled", NULL, 0) != -1) {
codeCacheConsolidationEnabled = TRUE;
}
}
Copy link
Contributor

Choose a reason for hiding this comment

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

same comment as for aix modifications.

Copy link
Contributor
@dsouzai dsouzai left a comment

Choose a reason for hiding this comment

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

LGTM

@dsouzai
Copy link
Contributor
dsouzai commented Jun 18, 2025

jenkins build aarch64,arm,aix,plinux,riscv,xlinux,x32linux,zlinux

@dsouzai dsouzai self-assigned this Jun 18, 2025
@dsouzai dsouzai merged commit bf4e2c4 into eclipse-omr:master Jun 19, 2025
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants
0