qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Richard Henderson <richard.henderson@linaro.org>
To: Paolo Bonzini <pbonzini@redhat.com>, qemu-devel@nongnu.org
Subject: Re: [PATCH] atomics: eliminate mb_read/mb_set
Date: Fri, 26 May 2023 08:55:31 -0700	[thread overview]
Message-ID: <3e797413-a8ee-ecd3-8775-b22107cd0418@linaro.org> (raw)
In-Reply-To: <20230526081810.423315-1-pbonzini@redhat.com>

On 5/26/23 01:18, Paolo Bonzini wrote:
> qatomic_mb_read and qatomic_mb_set were the very first atomic primitives
> introduced for QEMU; their semantics are unclear and they provide a false
> sense of safety.
> 
> The last use of qatomic_mb_read() has been removed, so delete it.
> qatomic_mb_set() instead can survive as an optimized
> qatomic_set()+smp_mb(), similar to Linux's smp_store_mb(), but
> rename it to qatomic_set_mb() to match the order of the two
> operations.
> 
> Signed-off-by: Paolo Bonzini<pbonzini@redhat.com>
> ---
>   accel/tcg/cpu-exec.c              |  2 +-
>   accel/tcg/tcg-accel-ops-mttcg.c   |  2 +-
>   accel/tcg/tcg-accel-ops-rr.c      |  4 ++--
>   docs/devel/atomics.rst            | 27 ++++-----------------------
>   include/qemu/atomic.h             |  4 ++--
>   monitor/qmp.c                     |  2 +-
>   softmmu/cpus.c                    |  2 +-
>   softmmu/physmem.c                 |  2 +-
>   target/arm/hvf/hvf.c              |  2 +-
>   tests/unit/test-aio-multithread.c |  2 +-
>   util/qemu-coroutine-lock.c        |  4 ++--
>   11 files changed, 17 insertions(+), 36 deletions(-)

Reviewed-by: Richard Henderson <richard.henderson@linaro.org>

r~


      reply	other threads:[~2023-05-26 15:55 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-05-26  8:18 [PATCH] atomics: eliminate mb_read/mb_set Paolo Bonzini
2023-05-26 15:55 ` Richard Henderson [this message]

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=3e797413-a8ee-ecd3-8775-b22107cd0418@linaro.org \
    --to=richard.henderson@linaro.org \
    --cc=pbonzini@redhat.com \
    --cc=qemu-devel@nongnu.org \
    /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).