Re: [PATCH 0/2] Batch register access for live migration optimization

From: Marc Zyngier

Date: Fri Sep 18 2026 - 08:17:56 EST


On Fri, 18 Sep 2026 09:18:13 +0100,
Yize Wang <wangyize7@xxxxxxxxxx> wrote:
>
> This series adds batch register access support to KVM/arm64 to reduce
> syscall overhead during VM 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.
>
> 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 (2):
> KVM: arm64: Add batch group constant and data structure to UAPI header
> KVM: arm64: Add VGIC v3 batch register access implementation

Questions:

- Why only the MMIO registers?

- Why not the sysregs?

- Why only the GIC?

- Why not all of the state?

- Where is the corresponding userspace code?

More importantly, since this is about batching system calls:

- Why can't this be done with io_uring instead?

M.

--
Without deviation from the norm, progress is not possible.