Skip to content

QIOChannel flags + multifd zerocopy

Leonardo Bras qemu-devel 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest3 patches 58 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3io: Enable write flags for QIOChannelchardev/char-io.c hw/remote/mpqemu-link.c include/io/channel.h +10 more+81 -452 replies
2/3io: Add zerocopy and errqueueinclude/io/channel-socket.h include/io/channel.h io/channel-socket.c +3 more+138 -027 replies
3/3migration: multifd: Enable zerocopymigration/multifd-zlib.c migration/multifd-zstd.c migration/multifd.c +1 more+16 -1027 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH v1 0/3] QIOChannel flags + multifd zerocopy

This patch series intends to enable MSG_ZEROCOPY in QIOChannel, and make use of it for multifd migration performance improvement.

Patch #1 enables the use of flags on qio_channel_write*(), allowing more flexibility in using the channel.
It was designed for MSG_ZEROCOPY usage, in which it's a good idea having a eassy way to choose what packets are sent with the flag, but also makes it more flexible for future usage.

Patch #2 just adds the MSG_ZEROCOPY feature, and defines the enablement mechanics, while not enabling it in any code.

Patch #3 enables MSG_ZEROCOPY for migration / multifd.

Results:
So far, the resource usage of __sys_sendmsg() reduced 15 times, and the overall migration took 13-18% less time, based in synthetic workload.

The objective is to reduce migration time in hosts with heavy cpu usage.

Leonardo Bras (3):
io: Enable write flags for QIOChannel
io: Add zerocopy and errqueue
migration: multifd: Enable zerocopy

 chardev/char-io.c                   |  2 +-
 hw/remote/mpqemu-link.c             |  2 +-
 include/io/channel-socket.h         |  2 +
 include/io/channel.h                | 85 +++++++++++++++++++++++------
 io/channel-buffer.c                 |  1 +
 io/channel-command.c                |  1 +
 io/channel-file.c                   |  1 +
 io/channel-socket.c                 | 80 ++++++++++++++++++++++++++-
 io/channel-tls.c                    | 12 ++++
 io/channel-websock.c                | 10 ++++
 io/channel.c                        | 64 +++++++++++++---------
 migration/multifd-zlib.c            |  7 ++-
 migration/multifd-zstd.c            |  7 ++-
 migration/multifd.c                 |  9 ++-
 migration/multifd.h                 |  3 +-
 migration/rdma.c                    |  1 +
 scsi/pr-manager-helper.c            |  2 +-
 tests/unit/test-io-channel-socket.c |  1 +
 18 files changed, 235 insertions(+), 55 deletions(-)
Signature · 1 line
2.33.0