Integrated: 8280828: Improve invariants in NonblockingQueue::append
Kim Barrett
kbarrett at openjdk.java.net
Tue Feb 8 20:32:47 UTC 2022
On Thu, 27 Jan 2022 20:34:29 GMT, Kim Barrett <kbarrett at openjdk.org> wrote:
> 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.
This pull request has now been integrated.
Changeset: d658d945
Author: Kim Barrett <kbarrett at openjdk.org>
URL: https://git.openjdk.java.net/jdk/commit/d658d945cf57bab8e61302841dcb56b36e48eff3
Stats: 45 lines in 1 file changed: 19 ins; 6 del; 20 mod
8280828: Improve invariants in NonblockingQueue::append
Reviewed-by: iwalulya, tschatzl
-------------
PR: https://git.openjdk.java.net/jdk/pull/7250
More information about the hotspot-dev
mailing list