All of lore.kernel.org
 help / color / mirror / Atom feed
From: Leonardo Bras Soares Passos <leobras@redhat.com>
To: "Daniel P. Berrangé" <berrange@redhat.com>
Cc: "Elena Ufimtseva" <elena.ufimtseva@oracle.com>,
	"John G Johnson" <john.g.johnson@oracle.com>,
	"Jagannathan Raman" <jag.raman@oracle.com>,
	qemu-block@nongnu.org, "Juan Quintela" <quintela@redhat.com>,
	qemu-devel <qemu-devel@nongnu.org>,
	"Dr. David Alan Gilbert" <dgilbert@redhat.com>,
	"Peter Xu" <peterx@redhat.com>,
	"Markus Armbruster" <armbru@redhat.com>,
	"Paolo Bonzini" <pbonzini@redhat.com>,
	"Marc-André Lureau" <marcandre.lureau@redhat.com>,
	"Fam Zheng" <fam@euphon.net>, "Eric Blake" <eblake@redhat.com>
Subject: Re: [PATCH v10 7/7] multifd: Implement zero copy write in multifd migration (multifd-zero-copy)
Date: Wed, 27 Apr 2022 08:31:26 -0300	[thread overview]
Message-ID: <CAJ6HWG6b=ShhO5E+bW7Y65eWRbBYpW=B3S=tFoOYaeT4hMfySA@mail.gmail.com> (raw)
In-Reply-To: <YmkC51KEA1+SOoc9@redhat.com>

On Wed, Apr 27, 2022 at 5:46 AM Daniel P. Berrangé <berrange@redhat.com> wrote:
>
> On Tue, Apr 26, 2022 at 08:06:56PM -0300, Leonardo Bras wrote:
> > Implement zero copy send on nocomp_send_write(), by making use of QIOChannel
> > writev + flags & flush interface.
> >
> > Change multifd_send_sync_main() so flush_zero_copy() can be called
> > after each iteration in order to make sure all dirty pages are sent before
> > a new iteration is started. It will also flush at the beginning and at the
> > end of migration.
> >
> > Also make it return -1 if flush_zero_copy() fails, in order to cancel
> > the migration process, and avoid resuming the guest in the target host
> > without receiving all current RAM.
> >
> > This will work fine on RAM migration because the RAM pages are not usually freed,
> > and there is no problem on changing the pages content between writev_zero_copy() and
> > the actual sending of the buffer, because this change will dirty the page and
> > cause it to be re-sent on a next iteration anyway.
> >
> > A lot of locked memory may be needed in order to use multifd migration
> > with zero-copy enabled, so disabling the feature should be necessary for
> > low-privileged users trying to perform multifd migrations.
> >
> > Signed-off-by: Leonardo Bras <leobras@redhat.com>
> > ---
> >  migration/multifd.h   |  2 ++
> >  migration/migration.c | 11 ++++++++++-
> >  migration/multifd.c   | 37 +++++++++++++++++++++++++++++++++++--
> >  migration/socket.c    |  5 +++--
> >  4 files changed, 50 insertions(+), 5 deletions(-)
>
> Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
>
>
> With regards,
> Daniel

Thanks for reviewing, Daniel!

Best regards,
Leo

> --
> |: https://berrange.com      -o-    https://www.flickr.com/photos/dberrange :|
> |: https://libvirt.org         -o-            https://fstop138.berrange.com :|
> |: https://entangle-photo.org    -o-    https://www.instagram.com/dberrange :|
>



  reply	other threads:[~2022-04-27 11:33 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-04-26 23:06 [PATCH v10 0/7] MSG_ZEROCOPY + multifd Leonardo Bras
2022-04-26 23:06 ` [PATCH v10 1/7] QIOChannel: Add flags on io_writev and introduce io_flush callback Leonardo Bras
2022-04-26 23:06 ` [PATCH v10 2/7] QIOChannelSocket: Implement io_writev zero copy flag & io_flush for CONFIG_LINUX Leonardo Bras
2022-04-26 23:06 ` [PATCH v10 3/7] migration: Add zero-copy-send parameter for QMP/HMP for Linux Leonardo Bras
2022-04-26 23:06 ` [PATCH v10 4/7] migration: Add migrate_use_tls() helper Leonardo Bras
2022-04-26 23:06 ` [PATCH v10 5/7] multifd: multifd_send_sync_main now returns negative on error Leonardo Bras
2022-04-26 23:06 ` [PATCH v10 6/7] multifd: Send header packet without flags if zero-copy-send is enabled Leonardo Bras
2022-04-26 23:26   ` Peter Xu
2022-04-27 11:30     ` Leonardo Bras Soares Passos
2022-04-28 13:46     ` Dr. David Alan Gilbert
2022-04-27  8:44   ` Daniel P. Berrangé
2022-04-27 11:30     ` Leonardo Bras Soares Passos
2022-04-26 23:06 ` [PATCH v10 7/7] multifd: Implement zero copy write in multifd migration (multifd-zero-copy) Leonardo Bras
2022-04-26 23:26   ` Peter Xu
2022-04-27 11:31     ` Leonardo Bras Soares Passos
2022-04-27  8:46   ` Daniel P. Berrangé
2022-04-27 11:31     ` Leonardo Bras Soares Passos [this message]
2022-04-28 14:08 ` [PATCH v10 0/7] MSG_ZEROCOPY + multifd Dr. David Alan Gilbert
2022-04-28 17:52   ` 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='CAJ6HWG6b=ShhO5E+bW7Y65eWRbBYpW=B3S=tFoOYaeT4hMfySA@mail.gmail.com' \
    --to=leobras@redhat.com \
    --cc=armbru@redhat.com \
    --cc=berrange@redhat.com \
    --cc=dgilbert@redhat.com \
    --cc=eblake@redhat.com \
    --cc=elena.ufimtseva@oracle.com \
    --cc=fam@euphon.net \
    --cc=jag.raman@oracle.com \
    --cc=john.g.johnson@oracle.com \
    --cc=marcandre.lureau@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=peterx@redhat.com \
    --cc=qemu-block@nongnu.org \
    --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.