This is a rebase with no code changes; the prerequisites (Yanfei Xu's two RDMA series) were merged in migration-20260925-pull-request.
v1: https://lore.kernel.org/qemu-devel/[email protected]/ This series splits the RDMA live-migration send path into two threads: - a producer thread (the migration thread) that scans dirty pages and records which chunks must be migrated, pushing chunk descriptors (block + chunk index + dirty byte span) onto a lock-free SPSC ring; and - a consumer thread that owns the RDMA queue pair: it drains the ring, posts the RDMA writes and control messages, handles chunk registration and barriers, and polls the completion queue. Chunk-granular descriptors on the ring replace the previous per-page merge logic on the migration thread. Patches 1-12 are the producer/consumer split. Patch 13 (Jack Wang) negotiates the batched chunk registration capability so a peer that lacks it falls back to one chunk per request. Results ------- 64 GiB guest, single-path RDMA, memload workload (one-time RAM fill, fixed dirty set). "before" is the single-thread send path with only the nb_sent-stats patch (patch 1) applied; "after" is the full producer/consumer series, so the delta isolates the split itself. pin_all=off: - total migration time: -16.2% (24 GiB fill), -14.2% (60 GiB fill) - transfer-phase time: -16.3% (24 GiB fill), -14.2% (60 GiB fill) - RAM throughput: +17.2% (24 GiB fill), +16.6% (60 GiB fill) - guest downtime: -55.3% (24 GiB fill), -23.1% (60 GiB fill) pin_all=on (whole-RAM registration at setup is unchanged and dominates total time, so the split shows mainly in the transfer phase): - total migration time: -5.0% - transfer-phase time: -10.9% - transfer speed: +12.9% - guest downtime: -1.5% QP saturation was measured with the new nb_sent send-queue counter: send-queue "drain to zero" events (queue starved empty) fell by ~99% in the transfer-bound pin_all=off cases (24 GiB: 26609 -> 276; 60 GiB: 63771 -> 641), while "full-queue" hits rose. This is the first step toward RDMA multipath migration. Dmitrii Omelchenko (12): migration/rdma: Add nb_sent send-queue-depth stats migration/rdma: Add producer/consumer send-ring types migration/rdma: Add send-ring lifecycle (no consumer thread yet) migration/rdma: Add the send consumer thread (drain only) migration/rdma: Handle write/flush/reg-stop on the consumer migration/rdma: Extract qemu_rdma_write_file() and dispatch FILE migration/rdma: Switch the producer onto the send ring migration/rdma: Add producer/consumer tuning instrumentation migration/rdma: drain the send ring in batches migration/rdma: size reg_resp.len by the register request count migration/rdma: batch chunk registration in one round-trip migration/rdma: trace batching and register runs Jack Wang (1): migration/rdma: negotiate batched chunk registration migration/rdma.c | 1275 +++++++++++++++++++++++++++++----------- migration/trace-events | 18 + 2 files changed, 956 insertions(+), 337 deletions(-) base-commit: 71f25c75417d31c214ba2cd26b273c114fc99987 -- 2.39.5
