Skip to content

Update non-FLC flatlock exit to use CAS #21877

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
May 23, 2025

Conversation

fengxue-IS
Copy link
Contributor

Use CompareAndSwap to ensure updates to lockword is not overwritten during exit.

Also ensure vthread blocked on monitor is notified properly.

Related: #21826

@fengxue-IS fengxue-IS requested a review from babsingh May 14, 2025 18:15
@fengxue-IS fengxue-IS marked this pull request as ready for review May 14, 2025 19:38
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.

do the timeouts in #21826 no longer happen with this PR?

@fengxue-IS fengxue-IS force-pushed the 21826 branch 2 times, most recently from d9c2917 to f001376 Compare May 15, 2025 20:47
@fengxue-IS fengxue-IS force-pushed the 21826 branch 2 times, most recently from 5ccf3dc to f6ef0b1 Compare May 21, 2025 22:17
@fengxue-IS fengxue-IS requested a review from babsingh May 22, 2025 17:17
@babsingh
Copy link
Contributor

changes ltgm, @fengxue-IS can you squash the commits?

@babsingh
Copy link
Contributor

jenkins test sanity plinux jdk21

@babsingh
Copy link
Contributor

jenkins test sanity alinux jdk24

- Use CompareAndSwap to ensure updates to lockword is not overwritten during exit.
- Also ensure vthread blocked on monitor is notified properly.
- Create separate jdk24+ monitorexit code path

Signed-off-by: Jack Lu <[email protected]>
@fengxue-IS
Copy link
Contributor Author

@babsingh can you please restart the PR builds, I think the squash accidentally removed an extra line of code.

@babsingh
Copy link
Contributor

jenkins test sanity alinux jdk24

@babsingh
Copy link
Contributor

jenkins test sanity plinux jdk21

@babsingh
Copy link
Contributor

jenkins compile win jdk24

@babsingh babsingh merged commit 43bc22d into eclipse-openj9:master May 23, 2025
10 checks passed
}
} else {
j9objectmonitor_t newLock = 0;
I_32 casSuccess = FALSE;
Copy link
Contributor

Choose a reason for hiding this comment

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

The type of casSuccess should be BOOLEAN.

Copy link
Contributor

Choose a reason for hiding this comment

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

Opened #21935 to address it.

babsingh added a commit to babsingh/openj9 that referenced this pull request May 23, 2025
@babsingh
Copy link
Contributor

babsingh commented May 23, 2025

@fengxue-IS Can you address the following concerns, which were missed?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants