RFR: 8280828: Improve invariants in NonblockingQueue::append [v3]

Kim Barrett kbarrett at openjdk.java.net
Tue Feb 8 20:32:45 UTC 2022


> Please review this change to NonblockingQueue to improve invariants in the
> append operation by making a change in try_pop.
> 
> When taking the last entry in the queue, try_pop needs to do some cleanup of
> the queue fields, setting them to NULL.  The order of those cleanups doesn't
> matter for correctness.  However, setting first _head then _tail permits
> append to assert that _head is NULL when it finds _tail was NULL.  The current
> order (set _tail first, then _head) doesn't permit such an assertion.
> 
> Testing:
> mach5 tier1-3
> 
> I also did lots of testing with this change included while investigating
> JDK-8273383.

Kim Barrett has updated the pull request with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought in by the merge/rebase. The pull request contains four additional commits since the last revision:

 - Merge branch 'master' into append-invariant
 - Merge branch 'master' into append-invariant
 - minor comment fixes
 - append invariant

-------------

Changes:
  - all: https://git.openjdk.java.net/jdk/pull/7250/files
  - new: https://git.openjdk.java.net/jdk/pull/7250/files/9648d183..89b8f300

Webrevs:
 - full: https://webrevs.openjdk.java.net/?repo=jdk&pr=7250&range=02
 - incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=7250&range=01-02

  Stats: 379 lines in 11 files changed: 325 ins; 30 del; 24 mod
  Patch: https://git.openjdk.java.net/jdk/pull/7250.diff
  Fetch: git fetch https://git.openjdk.java.net/jdk pull/7250/head:pull/7250

PR: https://git.openjdk.java.net/jdk/pull/7250


More information about the hotspot-dev mailing list