qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Pierrick Bouvier <pierrick.bouvier@linaro.org>
To: Paolo Bonzini <pbonzini@redhat.com>, qemu-devel@nongnu.org
Cc: qemu-stable@nongnu.org, alex.bennee@linaro.org
Subject: Re: [PATCH v2 0/2] meson: ensure we enable CMPXCHG128 on x86_64
Date: Mon, 7 Oct 2024 09:40:43 -0700	[thread overview]
Message-ID: <1d30632d-e045-4335-84e6-091a0c387cdf@linaro.org> (raw)
In-Reply-To: <20241007084342.1264048-1-pbonzini@redhat.com>

On 10/7/24 01:43, Paolo Bonzini wrote:
> 
> Alex discovered that CMPXCHG128 was not enabled when building for
> x86_64, resulting in slow execution for wide atomic instructions,
> creating a huge contention when combined with a high number of cpus
> (found while booting android aarch64 guest on x86_64 host).
> 
> The problem is that even though we enable -mcx16 option for x86_64, this
> is not used when testing for CMPXCHG128. Thus, we silently turn it off.
> 
> x86_64 is the only architecture adding machine flags for now, so the
> problem is limited to this host architecture.  However, the problem
> is generic, so define a new variable for all the -m options, so that
> they can be used for other such tests in the future.
> 
> Based-on: <20241004223715.1275428-1-pierrick.bouvier@linaro.org>
> Supersedes: <20241004220123.978938-1-pierrick.bouvier@linaro.org>
> 
> Paolo Bonzini (2):
>    meson: define qemu_isa_flags
>    meson: ensure -mcx16 is passed when detecting ATOMIC128
> 
>   meson.build | 33 ++++++++++++++++++++-------------
>   1 file changed, 20 insertions(+), 13 deletions(-)
> 

Hi Paolo,

Thanks for fixing this.

Series:
Reviewed-by: Pierrick Bouvier <pierrick.bouvier@linaro.org>

I was wondering why we have a specific flags path for x64.
People who are interested in getting machine specific binaries can 
always play with CFLAGS, so what was the original intent here?

Thanks,
Pierrick


      parent reply	other threads:[~2024-10-07 16:41 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-10-07  8:43 [PATCH v2 0/2] meson: ensure we enable CMPXCHG128 on x86_64 Paolo Bonzini
2024-10-07  8:43 ` [PATCH 1/2] meson: define qemu_isa_flags Paolo Bonzini
2024-10-07 14:46   ` Richard Henderson
2024-10-07 14:48     ` Paolo Bonzini
2024-10-07 14:55       ` Richard Henderson
2024-10-07 14:57     ` Michael Tokarev
2024-10-07  8:43 ` [PATCH 2/2] meson: ensure -mcx16 is passed when detecting ATOMIC128 Paolo Bonzini
2024-10-07 14:46   ` Richard Henderson
2024-10-07  9:01 ` [PATCH v2 0/2] meson: ensure we enable CMPXCHG128 on x86_64 Michael Tokarev
2024-10-07  9:58 ` Alex Bennée
2024-10-07 16:40 ` Pierrick Bouvier [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=1d30632d-e045-4335-84e6-091a0c387cdf@linaro.org \
    --to=pierrick.bouvier@linaro.org \
    --cc=alex.bennee@linaro.org \
    --cc=pbonzini@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-stable@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).