qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v3 0/2] meson: ensure we enable CMPXCHG128 on x86_64
@ 2024-10-07 17:23 Paolo Bonzini
  2024-10-07 17:23 ` [PATCH 1/2] meson: define qemu_isa_flags Paolo Bonzini
                   ` (3 more replies)
  0 siblings, 4 replies; 10+ messages in thread
From: Paolo Bonzini @ 2024-10-07 17:23 UTC (permalink / raw)
  To: qemu-devel; +Cc: mjt, alex.bennee, richard.henderson


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>

v2->v3: collect *-by tags
        append to qemu_isa_flags instead of prepending

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(-)

-- 
2.46.1



^ permalink raw reply	[flat|nested] 10+ messages in thread
* [PATCH v2 0/2] meson: ensure we enable CMPXCHG128 on x86_64
@ 2024-10-07  8:43 Paolo Bonzini
  2024-10-07  8:43 ` [PATCH 1/2] meson: define qemu_isa_flags Paolo Bonzini
  0 siblings, 1 reply; 10+ messages in thread
From: Paolo Bonzini @ 2024-10-07  8:43 UTC (permalink / raw)
  To: qemu-devel; +Cc: pierrick.bouvier, qemu-stable, alex.bennee


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(-)

-- 
2.46.1



^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2024-10-07 19:13 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-10-07 17:23 [PATCH v3 0/2] meson: ensure we enable CMPXCHG128 on x86_64 Paolo Bonzini
2024-10-07 17:23 ` [PATCH 1/2] meson: define qemu_isa_flags Paolo Bonzini
2024-10-07 17:23 ` [PATCH 2/2] meson: ensure -mcx16 is passed when detecting ATOMIC128 Paolo Bonzini
2024-10-07 17:37 ` [PATCH v3 0/2] meson: ensure we enable CMPXCHG128 on x86_64 Michael Tokarev
2024-10-07 19:12 ` Richard Henderson
  -- strict thread matches above, loose matches on Subject: below --
2024-10-07  8:43 [PATCH v2 " 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

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).