qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/3] Reinvent BQL-free PIO/MMIO
@ 2025-06-20 15:14 Igor Mammedov
  2025-06-20 15:14 ` [PATCH 1/3] memory: reintroduce BQL-free fine-grained PIO/MMIO Igor Mammedov
                   ` (2 more replies)
  0 siblings, 3 replies; 15+ messages in thread
From: Igor Mammedov @ 2025-06-20 15:14 UTC (permalink / raw)
  To: qemu-devel
  Cc: kraxel, mst, anisinha, elena.ufimtseva, jag.raman, pbonzini,
	peterx, david, philmd

When booting WS2025 with following CLI
 1)   -M q35,hpet=off -cpu host -enable-kvm -smp 240,sockets=4
the guest boots very slow and is sluggish after boot
or it's stuck on boot at spinning circle.

pref shows that VM is experiencing heavy BQL contention on IO path
which happens to be ACPI PM timer read access. A variation with
HPET enabled moves contention to HPET timer read access.
And it only gets worse with increasing number of VCPUs.

Series prevents large VM vCPUs contending on BQL due to PM|HPET timer
access and lets it move on with boot process.

It's basically resurecting Jan's idea [2] of BQL-free IO access,
with a twist that whitelist reads access only to minimze chances
of [3] issues. If we hit issues later on, it might be better
to actually find a root cause and perhaps fix guest side if
possible. (so I tested series with a bucn of different guests
instead, RHEL-[6..10]x64, WS2012R2, WS2016, WS2022, WS2025)

In my tests, with [1] CLI WS2025 guest wasn't able to boot within 30min
on both hosts
  * 32 core 2NUMA nodes
  * 448 cores 8NUMA nodes
With ACPI PM timer in BQL-free read mode, guest boots within approx:
 * 2min
 * 1min
respectively.

With HPET enabled boot time shrinks ~2x
 * 4m13 -> 2m21
 * 2m19 -> 1m15
respectively.

Using hv-time=on cpu option helps a lot (when it works) and
lets [1] guest boot fine in ~1-2min (this series reduces
boot time on ~10% on top of hv-time improvements).

2) 196ea13104f (memory: Add global-locking property to memory regions)
  ... de7ea885c539 (kvm: Switch to unlocked MMIO)
3) https://bugzilla.redhat.com/show_bug.cgi?id=1322713
  1beb99f787 (Revert "acpi: mark PMTIMER as unlocked")

Igor Mammedov (3):
  memory: reintroduce BQL-free fine-grained PIO/MMIO
  acpi: mark PMTIMER as unlocked
  mark HPET as unlocked

 include/system/memory.h   | 10 +++++++++-
 hw/acpi/core.c            |  2 ++
 hw/remote/vfio-user-obj.c |  2 +-
 hw/timer/hpet.c           |  2 ++
 system/memory.c           |  5 +++++
 system/memory_ldst.c.inc  | 18 +++++++++---------
 system/physmem.c          |  9 +++++----
 7 files changed, 33 insertions(+), 15 deletions(-)

--
2.43.5



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

end of thread, other threads:[~2025-07-01 14:34 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-06-20 15:14 [PATCH 0/3] Reinvent BQL-free PIO/MMIO Igor Mammedov
2025-06-20 15:14 ` [PATCH 1/3] memory: reintroduce BQL-free fine-grained PIO/MMIO Igor Mammedov
2025-06-20 16:53   ` Peter Xu
2025-06-23 12:51     ` Igor Mammedov
2025-06-23 13:36       ` Peter Xu
2025-06-24  7:07         ` Gerd Hoffmann
2025-06-24 10:45           ` Igor Mammedov
2025-06-27 12:02             ` Igor Mammedov
2025-06-30 10:02               ` Gerd Hoffmann
2025-07-01 14:33                 ` Igor Mammedov
2025-06-24 10:57         ` Igor Mammedov
2025-06-20 15:14 ` [PATCH 2/3] acpi: mark PMTIMER as unlocked Igor Mammedov
2025-06-20 15:14 ` [PATCH 3/3] mark HPET " Igor Mammedov
2025-06-20 17:01   ` Peter Maydell
2025-06-24 10:39     ` Igor Mammedov

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