Withdrawn: 8293416: ZGC: Set mark bit with unconditional atomic ops

duke duke at openjdk.org
Wed Nov 9 07:56:20 UTC 2022


On Tue, 6 Sep 2022 10:48:19 GMT, hev <duke at openjdk.org> wrote:

> **Summary**
> Support to set ZGC mark bit with unconditional atomic ops.
> 
> **Motivation**
> ZGC currently modify mark-bitmap by a conditional atomic operation (cmpxchg). This way is not optimal, which will retry the loop when cmpxchg fails.
> 
> **Description**
> First, This patch-set add an new unconditional atomic operation: Atomic::fetch_and_or, which is implemented in different ways for different CPU architectures:
> 
> * Exclusive access: Non-nested loop
> 
> 
> retry:
>   ll old_val, addr
>   or new_val, old_val, set_val
>   sc new_val, addr
>   beq retry
> 
> 
> * Atomic access: One instruction
> 
> 
> ldset old_val, set_val, addr
> 
> 
> * Generic: Fallback to cmpxchg or use c++ __atomic_fetch_or
> 
> **Testing**
> * jtreg tests
> * benchmark tests

This pull request has been closed without being integrated.

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

PR: https://git.openjdk.org/jdk/pull/10182


More information about the hotspot-dev mailing list