Skip to content

Conversation

@kimbarrett
Copy link

@kimbarrett kimbarrett commented Dec 22, 2025

Please review this change to ConcurrentHashTable to use Atomic<Node*> for
the Node lists. Note that this does not complete the replacement of direct
uses of AtomicAccess by that class; there's still one more group remaining.

Testing: mach5 tier1-3


Progress

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

Issue

  • JDK-8374190: Convert ConcurrentHashTable atomic lists to use Atomic<T> (Enhancement - P4)

Reviewers

Reviewing

Using git

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

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

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 28951

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

Using diff file

Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/28951.diff

Using Webrev

Link to Webrev Comment

@bridgekeeper
Copy link

bridgekeeper bot commented Dec 22, 2025

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

@openjdk
Copy link

openjdk bot commented Dec 22, 2025

@kimbarrett 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:

8374190: Convert ConcurrentHashTable atomic lists to use Atomic<T>

Reviewed-by: dholmes

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 10 new commits pushed to the master 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 master branch, type /integrate in a new comment.

@openjdk
Copy link

openjdk bot commented Dec 22, 2025

@kimbarrett The following label will be automatically applied to this pull request:

  • hotspot

When this pull request is ready to be reviewed, an "RFR" email will be sent to the corresponding mailing list. If you would like to change these labels, use the /label pull request command.

@openjdk openjdk bot added the rfr Pull request is ready for review label Dec 22, 2025
@mlbridge
Copy link

mlbridge bot commented Dec 22, 2025

Webrevs

Copy link
Member

@dholmes-ora dholmes-ora left a comment

Choose a reason for hiding this comment

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

This all seems reasonable.

Thanks

Comment on lines 175 to +178
// only give out pointer to const Node pointer to avoid accidental
// assignment, thus here we must cast const part away. Method is not static
// due to an assert.
void release_assign_node_ptr(Node* const volatile * dst, Node* node) const;
void release_assign_node_ptr(const Atomic<Node*>* dst, Node* node) const;
Copy link
Member

Choose a reason for hiding this comment

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

The const part of the comment no longer seems relevant.

Copy link
Author

Choose a reason for hiding this comment

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

The const is still relevant, for the reason described. It's at least
arguable that it's kind of sketchy to do this. It certainly took me a bit of
study to understand. Note that I moved the position of the const qualifier
to its more usual location (in our code) for declaring a constant object (the
Atomic<Node*> is atomic). It could instead be written as Atomic<Node*> const*,
retaining the ordering from the original. Also see the implementation, where
we need to cast away the const qualifier, which is now being done with
const_cast rather than a C-style cast (that was also stripping off the volatile
qualifier, which the use of AtomicAccess implicitly reapplied).

@openjdk openjdk bot added the ready Pull request is ready to be integrated label Dec 23, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

hotspot [email protected] ready Pull request is ready to be integrated rfr Pull request is ready for review

Development

Successfully merging this pull request may close these issues.

2 participants