Skip to content

RFC MultiFD zero-copy improvements

Leonardo Bras qemu-devel 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 RFC Latest4 patches 7 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/4migration/multifd/zero-copy: Create helper function for flushingmigration/multifd.c+19 -111 reply
2/4migration/multifd/zero-copy: Merge header & pages send in a single writemigration/multifd.c migration/multifd.h+32 -252 replies
3/4QIOChannel: Add max_pending parameter to qio_channel_flush()include/io/channel.h io/channel-socket.c io/channel.c +1 more+12 -70 replies
4/4migration/multifd/zero-copy: Flush only the LRU half of the header arraymigration/multifd.c+11 -53 replies

Reviews trailers per patch

1 of 4 patches has a Reviewed-by or Acked-by.

PatchJuan Quintela
1/4R-b
2/4
3/4
4/4

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [RFC PATCH 0/4] MultiFD zero-copy improvements

RFC for an improvement suggested by Juan during the KVM Forum and a few optimizations I found in the way.

Patch #1 is just moving code to a helper, should have no impact.

Patch #2 is my implementation of Juan's suggestion. I implemented the simplest way I thought on the array size: a fixed defined value. I am not sure if this is fine, or if the array size should be either informed by the user either via QMP or cmdline.
That's an important point I really need feedback on.

Patch #3: Improve the qio_channel_flush() interface to accept flush waiting for some writes finished instead of all of them. This reduces the waiting time, since most recent writes/sends will take more time to finish, while the older ones are probably finished by the first recvmsg() syscall return.

Patch #4 uses #3 in multifd zero-copy. It flushes the LRU half of the header array, allowing more writes to happen while the most recent ones are ongoing, instead of waiting for everything to finish before sending more.

It all works fine in my tests, but maybe I missed some cornercase. Please provide any feedback you find fit.

Thank you all!

Best regards,
Leo

Leonardo Bras (4):
migration/multifd/zero-copy: Create helper function for flushing migration/multifd/zero-copy: Merge header & pages send in a single
write
QIOChannel: Add max_pending parameter to qio_channel_flush() migration/multifd/zero-copy: Flush only the LRU half of the header
array

 include/io/channel.h |  7 +++-
 migration/multifd.h  |  5 ++-
 io/channel-socket.c  |  5 ++-
 io/channel.c         |  5 ++-
 migration/multifd.c  | 88 ++++++++++++++++++++++++++------------------
 5 files changed, 68 insertions(+), 42 deletions(-)
Signature · 1 line
2.38.0