Skip to content

8386889: [lworld] Redundant StoreStore membar after FlatValuePayload::read#2581

Closed
jsikstro wants to merge 2 commits into
openjdk:lworldfrom
jsikstro:JDK-8386889_redundant_storestore_flatvaluepayload_read
Closed

8386889: [lworld] Redundant StoreStore membar after FlatValuePayload::read#2581
jsikstro wants to merge 2 commits into
openjdk:lworldfrom
jsikstro:JDK-8386889_redundant_storestore_flatvaluepayload_read

Conversation

@jsikstro

@jsikstro jsikstro commented Jun 25, 2026

Copy link
Copy Markdown
Member

Hello,

This is (yet another) cleanup to remove redundant memory barriers after the new ValuePayload abstraction API in the runtime. The ValuePayload API's (including FlatValuePayload::read) does the necessary calls to order stores of the copy before the oop is published (OrderAccess::storestore), making the platform-specific memory barriers redundant.

I don't have hardware access to RISCV or PPC, but looking at the runtime implementations of OrderAccess::storestore, they achieve the same thing as the platform-specific memory barriers that I suggest we remove in this PR. GHA will show that this compiles at least. Edit: looks like linux-cross-compile is not enabled for the lworld branch yet.

membar(Assembler::StoreStore | Assembler::LoadLoad); and OrderAccess::storestore() both boil down to lwsync on PPC.

The C1 call to load_flat_array already omits the memory barrier, so we don't need to remove it here.

Testing:

  • Oracle's tier1-3 linux-aarch64
  • GHA


Progress

  • Change must not contain extraneous whitespace
  • Commit message must refer to an issue
  • Change must be properly reviewed (1 review required, with at least 1 Committer)

Issue

  • JDK-8386889: [lworld] Redundant StoreStore membar after FlatValuePayload::read (Bug - P4)

Reviewers

Reviewing

Using git

Checkout this PR locally:
$ git fetch https://git.openjdk.org/valhalla.git pull/2581/head:pull/2581
$ git checkout pull/2581

Update a local copy of the PR:
$ git checkout pull/2581
$ git pull https://git.openjdk.org/valhalla.git pull/2581/head

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 2581

View PR using the GUI difftool:
$ git pr show -t 2581

Using diff file

Download this PR as a diff file:
https://git.openjdk.org/valhalla/pull/2581.diff

Using Webrev

Link to Webrev Comment

@bridgekeeper

bridgekeeper Bot commented Jun 25, 2026

Copy link
Copy Markdown

👋 Welcome back jsikstro! A progress list of the required criteria for merging this PR into lworld will be added to the body of your pull request. There are additional pull request commands available for use with this pull request.

@openjdk

openjdk Bot commented Jun 25, 2026

Copy link
Copy Markdown

@jsikstro This change now passes all automated pre-integration checks.

ℹ️ This project also has non-automated pre-integration requirements. Please see the file CONTRIBUTING.md for details.

After integration, the commit message for the final commit will be:

8386889: [lworld] Redundant StoreStore membar after FlatValuePayload::read

Reviewed-by: mdoerr, aboldtch, fparain

You can use pull request commands such as /summary, /contributor and /issue to adjust it as needed.

At the time when this comment was updated there had been 1 new commit pushed to the lworld branch:

  • 59019cf: 8387192: [lworld] Review comment drop for core libs

Please see this link for an up-to-date comparison between the source branch of this pull request and the lworld branch.
As there are no conflicts, your changes will automatically be rebased on top of these commits when integrating. If you prefer to avoid this automatic rebasing, please check the documentation for the /integrate command for further details.

➡️ To integrate this PR with the above commit message to the lworld branch, type /integrate in a new comment.

@openjdk openjdk Bot added the rfr Pull request is ready for review label Jun 25, 2026
@mlbridge

mlbridge Bot commented Jun 25, 2026

Copy link
Copy Markdown

Webrevs

@TheRealMDoerr TheRealMDoerr 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.

This makes sense. Thanks for taking care of all platforms! I prefer a small change for PPC64.

Comment thread src/hotspot/cpu/ppc/templateTable_ppc_64.cpp
Co-authored-by: Martin Doerr <mdoerr@openjdk.org>

@TheRealMDoerr TheRealMDoerr 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.

Thank you! I appreciate it! LGTM.

@xmas92 xmas92 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

lgtm. Thanks for fixing.

@openjdk openjdk Bot added the ready Pull request is ready to be integrated label Jun 25, 2026

@fparain fparain left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

LGTM

@jsikstro

Copy link
Copy Markdown
Member Author

Thank you for the reviews @TheRealMDoerr, @xmas92, and @fparain!
/integrate

@openjdk

openjdk Bot commented Jun 26, 2026

Copy link
Copy Markdown

Going to push as commit b508893.
Since your change was applied there have been 69 commits pushed to the lworld branch:

Your commit was automatically rebased without conflicts.

@openjdk openjdk Bot added the integrated Pull request has been integrated label Jun 26, 2026
@openjdk openjdk Bot closed this Jun 26, 2026
@openjdk openjdk Bot removed ready Pull request is ready to be integrated rfr Pull request is ready for review labels Jun 26, 2026
@openjdk

openjdk Bot commented Jun 26, 2026

Copy link
Copy Markdown

@jsikstro Pushed as commit b508893.

💡 You may see a message that your pull request was closed with unmerged commits. This can be safely ignored.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

integrated Pull request has been integrated

Development

Successfully merging this pull request may close these issues.

4 participants