Files
reims-vgpu/docs
Anees Iqbal 0ee908e0a8 ⬆️ Point vendor/qemu at reims-graphics-pci's taking doorbell
QEMU f2c7e2a5 sends the vCPU's BAR 0 writes of reims-graphics-pci to
rvg_graphics_device_mmio_write_taking. A DOORBELL write of a command queue's
ring can then take the queue's next command buffer on the vCPU, post its
CB_SUBMITTED and raise the interrupt there, through the irqfd under KVM or
the BH elsewhere. The control ring's doorbell still goes to the ioeventfd,
and reads are unchanged.

Measured on msi under KVM in one boot, the same guest under window-drag
load, with the take switched on and off every 20 s (the first 5 s of each
window left out; 60 s on, 51 s off):
- WindowServer's commit to its wake in commitAndWaitUntilSubmitted fell to
  173 us on average, from 218 (p50 168, from 185; p99 440, against 402);
- its CA::Layer::commit_transaction-to-display (CLTD) fell to 384 us on
  average, from 434 (p50 376, from 400; p99 667, against 654). Every 20 s
  window with the take on beat both windows next to it;
- the vCPU took 32% of all doorbell writes, and 62% of the buffers that ask
  for their CB_SUBMITTED. The rest went to the queue's thread: 2731 because
  a ring-0 message published before them was not carried out yet, 23
  because a lock was held. The 6608 buffers that ask for no CB_SUBMITTED
  were left too;
- a take cost the vCPU 14 us at the p50 and 31 us at the p99, 274 us at
  most, and a plain doorbell write 2 us. A vCPU-posted CB_SUBMITTED reached
  the ring 10.7 us after the doorbell, against 199 us for one the queue's
  thread posted;
- the control thread waited for the decoder at 20.6% of its locks, from
  15.3%, for 38.2 ms a second in all, from 36.8. 2204 of those waits were
  behind a take's carried lock. The queue's thread never waited for it.
A boot of the plain build (no measurement) reached the desktop and dragged
at 59.6 composites a second, with CLTD averaging 369 us and no fatal,
ERROR or WARN line in the host log.

docs/qemu.md and docs/api.md now say which BAR 0 call QEMU makes, and how
the interrupt is sent since 36deb281.
2026-11-05 21:59:21 -08:00
..