All of lore.kernel.org
 help / color / mirror / Atom feed
From: Leonardo Bras <leobras@redhat.com>
To: "Daniel P. Berrangé" <berrange@redhat.com>,
	"Juan Quintela" <quintela@redhat.com>,
	"Dr. David Alan Gilbert" <dgilbert@redhat.com>,
	"Peter Xu" <peterx@redhat.com>,
	"Jason Wang" <jasowang@redhat.com>
Cc: Leonardo Bras <leobras@redhat.com>, qemu-devel@nongnu.org
Subject: [PATCH v3 0/3] QIOChannel async_write & async_flush + MSG_ZEROCOPY + multifd
Date: Wed, 22 Sep 2021 19:24:20 -0300	[thread overview]
Message-ID: <20210922222423.644444-1-leobras@redhat.com> (raw)

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(-)

-- 
2.33.0



             reply	other threads:[~2021-09-22 22:26 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-22 22:24 Leonardo Bras [this message]
2021-09-22 22:24 ` [PATCH v3 1/3] QIOChannel: Add io_async_writev & io_async_flush callbacks Leonardo Bras
2021-09-24 17:16   ` Daniel P. Berrangé
2021-09-28 21:52     ` Peter Xu
2021-09-29 19:06       ` Leonardo Bras Soares Passos
2021-09-30  8:34         ` Daniel P. Berrangé
2021-09-29 19:03     ` Leonardo Bras Soares Passos
2021-09-22 22:24 ` [PATCH v3 2/3] QIOChannelSocket: Implement io_async_write & io_async_flush Leonardo Bras
2021-09-24 17:38   ` Daniel P. Berrangé
2021-09-29 19:32     ` Leonardo Bras Soares Passos
2021-09-30  8:39       ` Daniel P. Berrangé
2021-09-28 22:45   ` Peter Xu
2021-09-29 19:36     ` Leonardo Bras Soares Passos
2021-09-29 19:58       ` Peter Xu
2021-09-22 22:24 ` [PATCH v3 3/3] multifd: Send using asynchronous write on nocomp to send RAM pages Leonardo Bras
2021-09-24 17:43   ` Daniel P. Berrangé
2021-09-28 22:48     ` Peter Xu
2021-09-29 19:46       ` Leonardo Bras Soares Passos
2021-09-29 19:44     ` Leonardo Bras Soares Passos
2021-09-28 22:50 ` [PATCH v3 0/3] QIOChannel async_write & async_flush + MSG_ZEROCOPY + multifd Peter Xu
2021-09-29 18:34   ` Leonardo Bras Soares Passos
2021-09-29 19:22     ` Peter Xu
2021-09-29 19:48       ` Leonardo Bras Soares Passos

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210922222423.644444-1-leobras@redhat.com \
    --to=leobras@redhat.com \
    --cc=berrange@redhat.com \
    --cc=dgilbert@redhat.com \
    --cc=jasowang@redhat.com \
    --cc=peterx@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=quintela@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.