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

ZOS Use Default Large Page Type Within Objectheap and Codecache #7585

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

AlenBadel
Copy link
Contributor

Previously, an additional [non]pageable argument is required when specifying a large page size for both the objectheap and codecache.
This isn't uniform with X, and P. There isn't really a reason for nonpageable to be an option within the codecache since it doesn't support nonpageable large pages.
It's also desireable that pageable large pages be used within the objectheap if both pageable, and nonpageable are available.

In this commit contains the following changes:

  1. The Codecache will use pageable large pages by default. The logic for nonpageable large pages will not be removed, since support can be added at a later time.
  2. The Objectheap will use pageable large pages of the specified size if both nonpageable and pageable pages are available.

This functionality can be used by specifying the following options for codecache, and objectheap respectively.
-Xlp:codecache:pagesize=
-Xlp:objectheao:pagesize=

Signed-off-by: AlenBadel [email protected]

@AlenBadel
Copy link
Contributor Author

@AlenBadel
Copy link
Contributor Author

AlenBadel commented Oct 24, 2019

OpenJ9 Docs PR: eclipse-openj9/openj9-docs#412

@gita-omr
Copy link
Contributor

@fjeremic could you take a look?

@dmitripivkine
Copy link
Contributor

I am not sure we should allow to omit pageable/nonpageable sub option for -Xlp:objectheap: for ZOS and add notion of default because it might create a confusion for customers. From another hand it makes usage for this option for ZOS to be compatible with other platforms (do we have such request ?) @joransiu

What I don't like what is driving this change: in attempt to do "mapping" of correspondent -XX options instead of handle them properly (like obviously -XX option does not have pageable/nonpageable info so use pageable as default) the -Xlp part is attempted to be changed. I believe this is wrong approach.

@AlenBadel
Copy link
Contributor Author

What I don't like what is driving this change: in attempt to do "mapping" of correspondent -XX options instead of handle them properly (like obviously -XX option does not have pageable/nonpageable info so use pageable as default) the -Xlp part is attempted to be changed. I believe this is wrong approach.

That's not the motivation anymore.

This is purely to be symmetrical with other platforms. The options [non]pageable will still work.

*requestedPageFlags = J9PORT_VMEM_PAGE_FLAG_FIXED;
}
}
}
Copy link
Contributor

Choose a reason for hiding this comment

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

This change looks in wrong place. Parser does context free check. This code uses context (pages available on OS).
Looks like it should be somewhere in j9vmem_find_valid_page_size()

Copy link
Contributor Author

@AlenBadel AlenBadel Oct 24, 2019

Choose a reason for hiding this comment

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

Copy link
Contributor

@dmitripivkine dmitripivkine Oct 24, 2019

Choose a reason for hiding this comment

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

So directly implemented into
https://github.com/eclipse/omr/blob/8b719f55ba3d8b8051b40b6dc4b38a1caa9afe5e/port/zos390/omrvmem.c#L1331

I believe this is the question.
I think you should take a look. It supports OMRPORT_VMEM_PAGE_FLAG_NOT_USED so there is a mechanism to handle unspecified [non]pageable there. However it seems does it differently and favour FIXED in this case as a legacy support.
I believe we need a discussion between ZOS - involved specialists about this proposed behaviour change (including motivation)

Copy link
Contributor Author

@AlenBadel AlenBadel Oct 24, 2019

Choose a reason for hiding this comment

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

I believe we need a discussion between ZOS - involved specialists about this proposed behaviour change (including motivation)

@joransiu Has already expressed that 1M pagerable large pages are preferred. If we don't have any obvious drawbacks I don't see why this can't be default behaviour. I think it adds value that the the command line option can be symmetrical along all architectures.

It's obvious on the codecache side that we don't have a choice of using nonpageable in the first place and mandatory requiring an additional option doesn't make sense.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'll make this change once we're on the same page and I'll let others chime in.

@AlenBadel
Copy link
Contributor Author

@joransiu Could you kindly chime in on this?

@dmitripivkine dmitripivkine self-requested a review December 3, 2019 18:57
Previously, an additional [non]pageable argument is required when specifying a large page size for both the objectheap and codecache.
This isn't uniform with X, and P. There isn't really a reason for nonpageable to be an option within the codecache since it doesn't support nonpageable large pages.
It's also desireable that pageable large pages be used within the objectheap if both pageable, and nonpageable are available.

In this commit contains the following changes:
1) The Codecache will use pageable large pages by default. The logic for nonpageable large pages will not be removed, since support can be added at a later time.
2) The Objectheap will use pageable large pages of the specified size if both nonpageable and pageable pages are available.

This functionality can be used by specifying the following options for codecache, and objectheap respectively.
-Xlp:codecache:pagesize=<size>
-Xlp:objectheao:pagesize=<size>

Signed-off-by: AlenBadel <[email protected]>
@genie-openj9
Copy link

Can one of the admins verify this patch?

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.

4 participants