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

[23.1] Backport: [GR-49300] Break the initialization cycle in NIO/cgroups code #7574

Closed

Conversation

zakkak
Copy link
Collaborator

@zakkak zakkak commented Oct 10, 2023

Backport of #7553

Conflicts were trivially resolved by accepting the new changes over the old ones.

@jerboaa can you please review?

@oracle-contributor-agreement oracle-contributor-agreement bot added the OCA Verified All contributors have signed the Oracle Contributor Agreement. label Oct 10, 2023
@zakkak zakkak changed the title 2023 10 10 backport 7553 [23.1] Backport: [GR-49300] Break the initialization cycle in NIO/cgroups code Oct 10, 2023
@zakkak zakkak force-pushed the 2023-10-10-backport-7553 branch 2 times, most recently from 9a77c83 to 285747b Compare October 10, 2023 10:26
@zakkak
Copy link
Collaborator Author

zakkak commented Oct 10, 2023

Not sure why ecj compilation fails with this, but not in the original PR.

Copy link
Collaborator

@jerboaa jerboaa left a comment

Choose a reason for hiding this comment

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

LGTM.

@jerboaa
Copy link
Collaborator

jerboaa commented Nov 10, 2023

@ezzarghili Any update on this? Thanks!

@jerboaa
Copy link
Collaborator

jerboaa commented Nov 10, 2023

@zakkak Could you please fix the checkstyle issue?

 Compiling com.oracle.svm.core with ecj-daemon(JDK 21): Failed due to error: -1
1. ERROR in /home/runner/work/graal/graal/substratevm/src/com.oracle.svm.core/src/com/oracle/svm/core/jdk/Target_java_nio_Bits.java (at line 72)
	static void setMAX_MEMORY(long value) {
	                               ^^^^^
The value of the parameter value is not used

jerboaa and others added 4 commits November 13, 2023 09:42
First, we use a separate accessor for page-alignedness as it doesn't
need the more sophisticated initialization of the directMemory field.

Next, ensure PhysicalMemory initialization is serialized and when it is,
set directMemory to a static value so that the container code can finish
initialization without introducing a cyle. The final directMemory value
based on the heap size is then published to JDK code by setting the VM
init level to 1. Therefore, application code would use the non-static
value as the upper bound.

Closes: oracle#556
(cherry picked from commit 1ae2dc0)
(cherry picked from commit 318f108)
@zakkak zakkak force-pushed the 2023-10-10-backport-7553 branch from 285747b to 1d2c7c1 Compare November 13, 2023 08:46
@zakkak
Copy link
Collaborator Author

zakkak commented Nov 13, 2023

@zakkak Could you please fix the checkstyle issue?

Done

@zakkak
Copy link
Collaborator Author

zakkak commented Nov 22, 2023

Hi @ezzarghili, this is a kind reminder.

@oubidar-Abderrahim oubidar-Abderrahim self-assigned this Nov 24, 2023
@oubidar-Abderrahim
Copy link
Member

This was already backported to 23.1 internally on GR-49328

@zakkak zakkak deleted the 2023-10-10-backport-7553 branch November 24, 2023 12:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
OCA Verified All contributors have signed the Oracle Contributor Agreement. redhat-interest
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants