Batch register access for live migration optimization
Get series with b4
b4 am [email protected]Versions newest first
- v1 Latest4 patches 1 replyIn review
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/4 | Sync KVM ARM VGIC batch register UAPI to QEMU headerslinux-headers/ | +9 | 0 replies | |
| 2/4 | hw/intc/arm_gicv3_kvm: Add batch helper structures and functionshw/ | +95 | 0 replies | |
| 3/4 | hw/intc/arm_gicv3_kvm: Refactor kvm_arm_gicv3_put for batch register accesshw/ | +425 | 0 replies | |
| 4/4 | hw/intc/arm_gicv3_kvm: Refactor kvm_arm_gicv3_get for batch register accesshw/ | +412 | 0 replies |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.
Cover letter [PATCH 0/4] Batch register access for live migration optimization
This series adds batch register access support to QEMU's KVM GICv3 register synchronization path, reducing syscall overhead during ARM64 live migration.
Currently, QEMU issues one ioctl per register when saving/restoring VGIC state. On large VM configurations this means tens of thousands of syscalls, where lock acquisition and context switch overhead dominates migration downtime. Thus, we provide a batch register method to allow userspace read/write multiple distributor and redistributor registers in a single call. In this way, we can significantly reduce syscalls and migration downtime.
All batch paths probe kernel capability at runtime and fall back to the original one-by-one path when the kernel does not support batch access, ensuring backward compatibility.
This series depends on the corresponding kernel patches that add KVM_DEV_ARM_VGIC_GRP_BATCH_REGS support.
Test the VM migration time under pressure conditions. The VM specifications for migration are as follows:
- VM use 4-K page;
- the number of VCPU is 160;
- the total memory is 320Gigabit;
- use 'Redis SET-benchmark' to pressurize VM;
Performance results (3-run average, ms):
| Metric | Without patch | With patch | Improvement |
|---------------------|---------------|------------|-------------|
| Migration downtime | 536 | 321 | 40% |
| Source (total) | 344 | 230 | 33% |
| - VGIC put | 158 | 40 | 75% |
| - VGIC get | 120 | 19 | 84% |
| Destination (total) | 192 | 91 | 53% |
| - VGIC put | 132 | 27 | 80% |Yize Wang (4):
Sync KVM ARM VGIC batch register UAPI to QEMU headers hw/intc/arm_gicv3_kvm: Add batch helper structures and functions hw/intc/arm_gicv3_kvm: Refactor kvm_arm_gicv3_put for batch register access hw/intc/arm_gicv3_kvm: Refactor kvm_arm_gicv3_get for batch register access
hw/intc/arm_gicv3_kvm.c | 1087 ++++++++++++++++++++++++++++++++++------- linux-headers/asm-arm64/kvm.h | 9 + 2 files changed, 925 insertions(+), 171 deletions(-)
References:
[1] [PATCH 0/2] Batch register access for live migration optimization
https://lore.kernel.org/kvmarm/[email protected]/T/#t