qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Paolo Bonzini <pbonzini@redhat.com>
To: Stefan Hajnoczi <stefanha@redhat.com>
Cc: Ying Fang <fangying1@huawei.com>, qemu-devel@nongnu.org
Subject: Re: [PATCH 2/4] atomics: update documentation for C11
Date: Tue, 7 Apr 2020 11:13:49 +0200	[thread overview]
Message-ID: <50e6abd4-f487-738e-6fda-df096c242a0a@redhat.com> (raw)
In-Reply-To: <20200407090604.GB247777@stefanha-x1.localdomain>


[-- Attachment #1.1: Type: text/plain, Size: 965 bytes --]

On 07/04/20 11:06, Stefan Hajnoczi wrote:
>> -
>> -However, and this is the important difference between
>> -atomic_mb_read/atomic_mb_set and sequential consistency, it is important
>> -for both threads to access the same volatile variable.  It is not the
>> -case that everything visible to thread A when it writes volatile field f
>> -becomes visible to thread B after it reads volatile field g. The store
>> -and load have to "match" (i.e., be performed on the same volatile
>> -field) to achieve the right semantics.
>> -
>> -
>> -These operations operate on any type that is as wide as an int or smaller.
>> +which however are deprecated.
> Please indicate why they are deprecated and advise which alternative is
> preferred.  This will help readers understand the current best practices
> and make a decision about whether to avoid the deprecated APIs.

True, I will put a link to the "Comparison with Linux" section and clarify.

Paolo


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

  reply	other threads:[~2020-04-07  9:14 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-06 19:13 [RFC PATCH 0/4] async: fix hangs on weakly-ordered architectures Paolo Bonzini
2020-04-06 19:13 ` [PATCH 1/4] atomics: convert to reStructuredText Paolo Bonzini
2020-04-06 19:58   ` Eric Blake
2020-04-07 10:29     ` Paolo Bonzini
2020-04-06 19:13 ` [PATCH 2/4] atomics: update documentation for C11 Paolo Bonzini
2020-04-06 20:03   ` Eric Blake
2020-04-07  9:06   ` Stefan Hajnoczi
2020-04-07  9:13     ` Paolo Bonzini [this message]
2020-04-06 19:13 ` [PATCH 3/4] rcu: do not mention atomic_mb_read/set in documentation Paolo Bonzini
2020-04-06 19:13 ` [PATCH 4/4] async: use explicit memory barriers and relaxed accesses Paolo Bonzini
2020-04-07  9:09   ` Stefan Hajnoczi
2020-04-07  9:18     ` Paolo Bonzini
2020-04-07  9:10 ` [RFC PATCH 0/4] async: fix hangs on weakly-ordered architectures Stefan Hajnoczi

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=50e6abd4-f487-738e-6fda-df096c242a0a@redhat.com \
    --to=pbonzini@redhat.com \
    --cc=fangying1@huawei.com \
    --cc=qemu-devel@nongnu.org \
    --cc=stefanha@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).