[PATCH 0/2] migration/rdma: fix blocking readv and zero-page accounting

Bin Guo posted 2 patches 1 day, 9 hours ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20260529070408.92651-1-guobin@linux.alibaba.com
Maintainers: Peter Xu <peterx@redhat.com>, Fabiano Rosas <farosas@suse.de>, Li Zhijian <lizhijian@fujitsu.com>
migration/rdma.c | 62 ++++++++++++++++++++++--------------------------
1 file changed, 29 insertions(+), 33 deletions(-)
[PATCH 0/2] migration/rdma: fix blocking readv and zero-page accounting
Posted by Bin Guo 1 day, 9 hours ago
This small series fixes two independent issues in the RDMA migration
code path that were noticed while reviewing the QIOChannelRDMA behavior
and migration statistics during RDMA live migration.

Patch 1 makes QIOChannelRDMA's readv honor the blocking flag set via
io_set_blocking().  Previously, in blocking mode it returned immediately
when the receive buffer could not satisfy the request, diverging from
other QIOChannel implementations.  The fix loops on
qemu_rdma_exchange_recv() while the channel is in blocking mode, and
removes the now-stale XXX comments about unimplemented blocking
support.

Patch 2 fixes transfer accounting for the RDMA zero page compression
path.  When a zero page is detected, an RDMA_CONTROL_COMPRESS message
is sent instead of an RDMA Write, but mig_stats.rdma_bytes and
ram_transferred_add() were never updated, so migration progress and
bandwidth were undercounted.  The patch accounts the wire cost
(RDMAControlHeader + RDMACompress payload), matching how the non-RDMA
path accounts for zero page markers.

Both patches are small and self-contained; no behavior change is
expected outside the RDMA migration path.

Bin Guo (2):
  migration/rdma: honor blocking mode in QIOChannelRDMA readv
  migration/rdma: account transferred bytes for zero page compression

 migration/rdma.c | 62 ++++++++++++++++++++++--------------------------
 1 file changed, 29 insertions(+), 33 deletions(-)

-- 
2.50.1 (Apple Git-155)