Skip to content

Create -XX:DisclaimDir= command line option - #23361

Merged
dsouzai merged 1 commit into
eclipse-openj9:masterfrom
mpirvu:diclaim_opt
Mar 2, 2026
Merged

Create -XX:DisclaimDir= command line option#23361
dsouzai merged 1 commit into
eclipse-openj9:masterfrom
mpirvu:diclaim_opt

Conversation

@mpirvu

@mpirvu mpirvu commented Feb 12, 2026

Copy link
Copy Markdown
Contributor

This commit creates a new command line option called -XX:DisclaimDir= which can be used to set the desired directory for the backing files created by the memory disclaim mechanism.
If no such option is specified, the JVM will use either swap (if possible) or /tmp directory.
If the specified directory does not exist or it's not a directory, the JVM will terminate.
If the specified directory exists, but it is not writeable or it has less than 1 GB free space, the JVM will continue to run, but it will not use the disclaim mechanism.
The disclaim mechanism will also be disabled if the specified directory is remote (e.g. nfs) or it's using RAM under the covers (e.g. ramfs ot tmpfs).

Depends on: eclipse-omr/omr#8125
Depends on: eclipse-omr/omr#8137

@mpirvu
mpirvu requested a review from dsouzai as a code owner February 12, 2026 20:42
@mpirvu mpirvu added the depends:omr Pull request is dependent on a corresponding change in OMR label Feb 12, 2026
@mpirvu
mpirvu marked this pull request as draft February 12, 2026 20:45
@mpirvu

mpirvu commented Feb 12, 2026

Copy link
Copy Markdown
Contributor Author

Changed to draft until the omr dependency gets integrated.

@mpirvu
mpirvu force-pushed the diclaim_opt branch 2 times, most recently from 47dccc5 to af5f4b0 Compare February 19, 2026 19:32
@mpirvu

mpirvu commented Feb 19, 2026

Copy link
Copy Markdown
Contributor Author

Jenkins test sanity xlinux,plinux,zlinux jdk21 depends eclipse/omr#master

@mpirvu

mpirvu commented Feb 19, 2026

Copy link
Copy Markdown
Contributor Author

@dsouzai Could you please review this PR?
@babsingh Could you please review the VM part of this PR?
Thanks

@dsouzai dsouzai left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Compiler changes look fine to me; I just have some minor thoughts

Comment thread runtime/compiler/control/J9Options.cpp Outdated
Comment thread runtime/compiler/control/J9Options.cpp Outdated
@mpirvu

mpirvu commented Feb 19, 2026

Copy link
Copy Markdown
Contributor Author

plinux had some testSCCMLTests1_openj9_0 failures related to destroying a SCC:

Testing: Test 35: CMVC 168131 : Cleanup
        Test start time: 2026/02/19 20:09:43 Coordinated Universal Time
        Running command: "/home/jenkins/workspace/Test_openjdk21_j9_sanity.functional_ppc64le_linux_Personal_testList_0/jdkbinary/j2sdk-image/bin/java"  -Xjit -Xgcpolicy:gencon -Xnocompressedrefs  -Xshareclasses:name=ShareClassesCMLTests,nonpersistent,destroy
        Time spent starting: 2 milliseconds
        Time spent executing: 19 milliseconds
        Test result: FAILED
         [ERR] JVMSHRC012I Cannot remove shared cache "ShareClassesCMLTests" as there are JVMs still attached to the cache
         [ERR] JVMSHRC430I Failed to remove current generation of shared class cache "ShareClassesCMLTests"

It's very unlikely that the code in this PR can cause such a failure.

@babsingh babsingh left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Minor formatting nits for consistency.

The existing PR build remains valid after these changes: https://openj9-jenkins.osuosl.org/job/PullRequest-OpenJ9/8740.

The SCC failures are known and unrelated; they have also been observed in other PR builds.

Comment thread runtime/vm/jvminit.c Outdated
Comment thread runtime/vm/jvminit.c Outdated
@mpirvu
mpirvu force-pushed the diclaim_opt branch 4 times, most recently from c2b7178 to fa38591 Compare February 26, 2026 17:18
This commit creates a new command line option called
`-XX:DisclaimDir=` which can be used to set the desired
directory for the backing files created by the memory
disclaim mechanism.
If no such option is specified, the JVM will use either
swap (if possible) or `/tmp` directory.
If the specified directory does not exist or it's not a
directory, the JVM will terminate.
If the specified directory exists, but it is not writeable
or it has less than 1 GB free space, the JVM will continue to
run, but it will not use the disclaim mechanism.
The disclaim mechanism will also be disabled if the
specified directory is remote (e.g. nfs) or it's using RAM
under the covers (e.g. ramfs ot tmpfs).

Depends on: eclipse-omr/omr#8125
Depends on: eclipse-omr/omr#8137

Signed-off-by: Marius <mpirvu@ca.ibm.com>
@mpirvu

mpirvu commented Feb 26, 2026

Copy link
Copy Markdown
Contributor Author

@dsouzai PR is ready for another review.

@dsouzai

dsouzai commented Feb 26, 2026

Copy link
Copy Markdown
Contributor

This PR is still set as a draft. But the changes look fine to me.

@mpirvu

mpirvu commented Feb 26, 2026

Copy link
Copy Markdown
Contributor Author

The PR will stay in draft mode until eclipse-omr/omr#8137 promotes.

@mpirvu

mpirvu commented Feb 26, 2026

Copy link
Copy Markdown
Contributor Author

Jenkins test sanity xlinux,plinux,zlinux jdk21 depends eclipse/omr#master

@mpirvu

mpirvu commented Feb 27, 2026

Copy link
Copy Markdown
Contributor Author

jenkins compile all jdk8,jdk25

@mpirvu

mpirvu commented Feb 27, 2026

Copy link
Copy Markdown
Contributor Author

jenkins compile xlinux,plinux,zlinux,alinux64 jdk8,jdk25 depends eclipse/omr#master

@mpirvu

mpirvu commented Feb 27, 2026

Copy link
Copy Markdown
Contributor Author

plinux fails testSCCMLTests1_openj9_1 with

Cannot remove shared cache "ShareClassesCMLTests" as there are JVMs still attached to the cache

This is a known issue.

@mpirvu
mpirvu marked this pull request as ready for review March 2, 2026 15:00
@mpirvu

mpirvu commented Mar 2, 2026

Copy link
Copy Markdown
Contributor Author

The OMR dependency has propagated to openj9-omr branch. This PR is ready to be merged.

@dsouzai
dsouzai merged commit 08d96d0 into eclipse-openj9:master Mar 2, 2026
28 of 29 checks passed
Comment thread runtime/compiler/control/J9Options.cpp
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comp:jit comp:vm depends:omr Pull request is dependent on a corresponding change in OMR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants