Re: RFR: 8275874: [JVMCI] use volatile accessors for all unaligned reads in c2v_readFieldValue

2021-10-25 Thread David Holmes
On Mon, 25 Oct 2021 14:33:27 GMT, Doug Simon  wrote:

> [JDK-8275645](https://bugs.openjdk.java.net/browse/JDK-8275645) resulted in 
> loosing single-copy atomicity for reads in `c2v_readFieldValue`. This PR 
> fixes that by using `_field_acquire` accessors for all aligned reads 
> and only using `_field` accessors for unaligned reads.

Isn't the title of this issue expressed incorrectly?

-

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


Re: RFR: 8275874: [JVMCI] use volatile accessors for all unaligned reads in c2v_readFieldValue

2021-10-25 Thread Doug Simon
On Mon, 25 Oct 2021 14:33:27 GMT, Doug Simon  wrote:

> [JDK-8275645](https://bugs.openjdk.java.net/browse/JDK-8275645) resulted in 
> loosing single-copy atomicity for reads in `c2v_readFieldValue`. This PR 
> fixes that by using `_field_acquire` accessors for all aligned reads 
> and only using `_field` accessors for unaligned reads.

@shipilev , it would be great if you could review this.

-

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


Re: RFR: 8275874: [JVMCI] use volatile accessors for all unaligned reads in c2v_readFieldValue

2021-10-25 Thread Tom Rodriguez
On Mon, 25 Oct 2021 14:33:27 GMT, Doug Simon  wrote:

> [JDK-8275645](https://bugs.openjdk.java.net/browse/JDK-8275645) resulted in 
> loosing single-copy atomicity for reads in `c2v_readFieldValue`. This PR 
> fixes that by using `_field_acquire` accessors for all aligned reads 
> and only using `_field` accessors for unaligned reads.

Marked as reviewed by never (Reviewer).

-

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


RFR: 8275874: [JVMCI] use volatile accessors for all unaligned reads in c2v_readFieldValue

2021-10-25 Thread Doug Simon
[JDK-8275645](https://bugs.openjdk.java.net/browse/JDK-8275645), resulted in 
the loose of single-copy atomicity for reads in c2v_readFieldValue. This PR 
fixes that by using the `_field_acquire` accessors for all aligned reads 
in c2v_readFieldValue and only using the `_field` accessors for unaligned 
reads.

-

Commit messages:
 - use _field_acquire for aligned reads in c2v_readFieldValue

Changes: https://git.openjdk.java.net/jdk/pull/6109/files
 Webrev: https://webrevs.openjdk.java.net/?repo=jdk=6109=00
  Issue: https://bugs.openjdk.java.net/browse/JDK-8275874
  Stats: 30 lines in 1 file changed: 2 ins; 18 del; 10 mod
  Patch: https://git.openjdk.java.net/jdk/pull/6109.diff
  Fetch: git fetch https://git.openjdk.java.net/jdk pull/6109/head:pull/6109

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