Skip to content

QIOChannel async_write & async_flush + MSG_ZEROCOPY + multifd

Leonardo Bras qemu-devel 2 versions In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v3 Latest3 patches 19 repliesIn review
  2. v23 patches 1 replySuperseded

Changes in v3 from the cover letter

- Patch #1: One more fallback
- Patch #2: Fall back to sync if fails to lock buffer memory in MSG_ZEROCOPY send.

Patches in v3 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3QIOChannel: Add io_async_writev & io_async_flush callbacksinclude/io/channel.h io/channel.c+129 -305 replies
2/3QIOChannelSocket: Implement io_async_write & io_async_flushinclude/io/channel-socket.h include/io/channel.h io/channel-socket.c+169 -106 replies
3/3multifd: Send using asynchronous write on nocomp to send RAM pages.migration/multifd.c+2 -14 replies

Reviews trailers per patch

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

Read the v3 thread

Cover letter [PATCH v3 0/3] QIOChannel async_write & async_flush + MSG_ZEROCOPY + multifd

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

Patch #1 creates new callbacks for QIOChannel, allowing the implementation of asynchronous writing.

Patch #2 implements async_write and async_flush on QIOChannelSocket,

Patch #3 Makes use of async_write + async_flush to enable MSG_ZEROCOPY for migration using multifd nocomp.

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.

---
Changes since v2:
- Patch #1: One more fallback
- Patch #2: Fall back to sync if fails to lock buffer memory in MSG_ZEROCOPY send.

Changes since v1:
- Reimplemented the patchset using async_write + async_flush approach.
- Implemented a flush to be able to tell whenever all data was written.

Leonardo Bras (3):
QIOChannel: Add io_async_writev & io_async_flush callbacks
QIOChannelSocket: Implement io_async_write & io_async_flush
multifd: Send using asynchronous write on nocomp to send RAM pages.

 include/io/channel-socket.h |   2 +
 include/io/channel.h        |  94 ++++++++++++++++---
 io/channel-socket.c         | 176 ++++++++++++++++++++++++++++++++++--
 io/channel.c                |  66 +++++++++++---
 migration/multifd.c         |   3 +-
 5 files changed, 300 insertions(+), 41 deletions(-)
Signature · 1 line
2.33.0