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

Expand omrvmemtest on Z/OS #4918

Merged
merged 1 commit into from
Mar 24, 2020
Merged

Expand omrvmemtest on Z/OS #4918

merged 1 commit into from
Mar 24, 2020

Conversation

AlenBadel
Copy link
Contributor

@AlenBadel AlenBadel commented Mar 10, 2020

Expand omrvmemtest on Z/OS

Expanding the current tests to add cases where OMRPORT_VMEM_PAGE_FLAG_PREFER_PAGEABLE may be used.

These test cases include:

  1. Default large page when pageable is preferred
    This test will return a pageable 1M default large page when available, and 1M fixed pages otherwise.
    If no large pages are configured an invalid large page state will be set.

  2. Default large page when pageable is preferred, and mode is OMRPORT_VMEM_MEMORY_MODE_EXECUTE
    This test will return a pageable 1M default large page when available, otherwise an invalid large page state will be set.

  3. Verify 1M large pages when pageable is preferred
    This test will verify that 1M large pages are supported if there exists a pageable, or fixed 1M pages are available.

  4. Verify 1M large pages when pageable is preferred, and mode is OMRPORT_VMEM_MEMORY_MODE_EXECUTE
    This test will verify that 1M large pages are supported only if 1M pageable is configured.

For more info on OMRPORT_VMEM_PAGE_FLAG_PREFER_PAGEABLE, see Pull Request #4762.

Signed-off-by: AlenBadel [email protected]

@AlenBadel
Copy link
Contributor Author

AlenBadel commented Mar 10, 2020

PR enables tests for functionality implemented here #4762

@AlenBadel
Copy link
Contributor Author

AlenBadel commented Mar 10, 2020

Running some additional sanity on my end.

FYI @gita-omr

@babsingh Could you please review this?

@gita-omr
Copy link
Contributor

Looks right on a high level, but I will let @babsingh review in detail. BTW: why do we have the same code in openj9?

@AlenBadel
Copy link
Contributor Author

why do we have the same code in openj9?

I'm not entirely sure why the downstream project OpenJ9 has j9vmemtest, since this test can be used instead. That's certainly a discussion that can be had in OpenJ9.

@mstoodle
Copy link
Contributor

Stupid question: I'm not sure I understand the "on Z/OS" part of this pull request. The changes don't appear to be in a z/OS specific file or under a z/OS specific macro. Isn't this really just adding some new scenarios to omrvmemtests ?

@AlenBadel
Copy link
Contributor Author

Stupid question: I'm not sure I understand the "on Z/OS" part of this pull request. The changes don't appear to be in a z/OS specific file or under a z/OS specific macro. Isn't this really just adding some new scenarios to omrvmemtests ?

Each platform has it's own implementation of omrvmem_testFindValidPageSize_impl which run these tests. These tests are only added under the Z/OS implementation since the related change only affected Z/OS.

#elif defined(J9ZOS390)
static int
omrvmem_testFindValidPageSize_impl(struct OMRPortLibrary *portLibrary, const char *testName)
{
...

@babsingh
Copy link
Contributor

@babsingh Could you please review this?

Please refer to eclipse-openj9/openj9#8791 (review) for the review since this pull request has near identical code to eclipse-openj9/openj9#8791.

@mstoodle
Copy link
Contributor

I understand this code exists in OMR and OpenJ9. It seems like this change is being reviewed at OpenJ9, so I'm going to close this PR until everything is worked out over there.

When there's a change to be made and reviewed at OMR, we will welcome it.

@AlenBadel
Copy link
Contributor Author

OpenJ9 uses omrporttest, and it's been decided to rely on the OMR port test implementation. @mstoodle I suggest that this PR be re-opened as these changes are required to verify #4762.

@mstoodle
Copy link
Contributor

Expecting the review and testing to happen in OMR then. Thanks @AlenBadel .

@mstoodle mstoodle reopened this Mar 16, 2020
@AlenBadel AlenBadel force-pushed the omrvmem branch 2 times, most recently from a81fc20 to b8acc82 Compare March 16, 2020 22:27
@AlenBadel
Copy link
Contributor Author

@fjeremic Could you kindly trigger a run sanity on Z/OS? Thanks!

@fjeremic
Copy link
Contributor

@genie-omr build zos

@AlenBadel
Copy link
Contributor Author

@fjeremic Would there be any further testing that could be triggered via PR?

@fjeremic
Copy link
Contributor

@fjeremic Would there be any further testing that could be triggered via PR?

Yeah. The test is common so we have to test all platforms. Then it's off to someone with port library experience for review. My suggestion is one of @rwy0717 or @youngar.

@genie-omr build all

@AlenBadel
Copy link
Contributor Author

Yeah. The test is common so we have to test all platforms. Then it's off to someone with port library experience for review. My suggestion is one of @rwy0717 or @youngar.

I was looking for further sanity that can be launched via PR. I was able to find that internally, and can say that everything looks clear on my end.

It must be brought up that there are a lot of references to OpenJ9 in this file. As each test is named after an OpenJ9 paging option variant.
@mstoodle Would you like to see an issue raised to track the removal of these?

@fjeremic
Copy link
Contributor

@genie-omr build all

@mstoodle
Copy link
Contributor

Thanks, @AlenBadel , please raise an issue (though I expect it doesn't need to be tackled with urgency).

@AlenBadel
Copy link
Contributor Author

@babsingh Could you please pass through the code one last time and give me a final pass? Thanks!

@AlenBadel
Copy link
Contributor Author

Thanks, @AlenBadel , please raise an issue (though I expect it doesn't need to be tackled with urgency).

Created Issue: #4947

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.

Code lgtm. But, the documentation can be improved. A reader may not understand the reference to OMRPORT_VMEM_PAGE_FLAG_PREFER_PAGEABLE. In the commit message, you can ...

  1. summarize the new feature and four new testcases; and
  2. add a link to your new feature for more details Add capability to give preference to pageable large pages on Z/OS #4762.

@AlenBadel
Copy link
Contributor Author

Thanks for the review Babneet. I agree with your suggestion and will be amending feature related functionality to the commit.

Just to note as I make further changes that #4918 (comment) all builds succeeded.

Expanding the current tests to add cases where OMRPORT_VMEM_PAGE_FLAG_PREFER_PAGEABLE may be used.

These test cases include:

1) Default large page when pageable is preferred
This test will return a pageable 1M default large page when available, and 1M fixed pages otherwise.
If no large pages are configured an invalid large page state will be set.

2) Default large page when pageable is preferred, and mode is OMRPORT_VMEM_MEMORY_MODE_EXECUTE
This test will return a pageable 1M default large page when available, otherwise an invalid large page state will be set.

3) Verify 1M large pages when pageable is preferred
This test will verify that 1M large pages are supported if there exists a pageable, or fixed 1M pages are available.

4) Verify 1M large pages when pageable is preferred, and mode is OMRPORT_VMEM_MEMORY_MODE_EXECUTE
This test will verify that 1M large pages are supported only if 1M pageable is configured.

For more info on OMRPORT_VMEM_PAGE_FLAG_PREFER_PAGEABLE, see Pull Request eclipse-omr#4762.

Signed-off-by: AlenBadel <[email protected]>
@AlenBadel
Copy link
Contributor Author

@mstoodle Please advise if you would like further reviewing.

@mstoodle
Copy link
Contributor

@genie-omr build all

@mstoodle
Copy link
Contributor

It looks fine to me, but this is not an area I consider myself an expert in.

@rwy0717 or @youngar or @charliegracie would one of you please be the committer here?

Copy link
Contributor

@mstoodle mstoodle left a comment

Choose a reason for hiding this comment

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

Changes look ok to me, but would prefer a committer close to this component take the committer role here.

@AlenBadel
Copy link
Contributor Author

@rwy0717 or @youngar or @charliegracie would one of you please be the committer here?

I would appreciate if someone could take a quick look at this, and ultimately get it merged.

@rwy7 rwy7 self-assigned this Mar 24, 2020
@rwy7
Copy link
Contributor

rwy7 commented Mar 24, 2020

Normally I ask that, for new tests, authors use gtest assertions and finer grained test cases, rather than reporting through the older test logging API. However, since this test makes use of helpers built on top of these logger APIs, I think this integrates nicely into the suite.

Since I don't see any comments that need addressing, I'm going to go ahead and merge this.

Thanks for the new test :)

@rwy7 rwy7 merged commit ea80e8c into eclipse-omr:master Mar 24, 2020
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.

6 participants