From: Fabiano Rosas <farosas@suse.de>
To: "Daniel P. Berrangé" <berrange@redhat.com>
Cc: Juraj Marcin <jmarcin@redhat.com>,
qemu-devel@nongnu.org, Peter Xu <peterx@redhat.com>,
Prasad Pandit <ppandit@redhat.com>
Subject: Re: [PATCH for-10.1 0/2] migration: actually make gnutls workaround functional
Date: Tue, 05 Aug 2025 12:28:38 -0300 [thread overview]
Message-ID: <87a54d3hzt.fsf@suse.de> (raw)
In-Reply-To: <aJISp1UvPCwwXyPf@redhat.com>
Daniel P. Berrangé <berrange@redhat.com> writes:
> On Tue, Aug 05, 2025 at 10:44:41AM -0300, Fabiano Rosas wrote:
>> Daniel P. Berrangé <berrange@redhat.com> writes:
>>
>> > On Mon, Aug 04, 2025 at 04:27:45PM -0300, Fabiano Rosas wrote:
>> >> Juraj Marcin <jmarcin@redhat.com> writes:
>> >>
>> >> > Hi Daniel,
>> >> >
>> >> > On 2025-08-01 18:02, Daniel P. Berrangé wrote:
>> >> >> This is a followup to previously merged patches that claimed to
>> >> >> workaround the gnutls bug impacting migration, but in fact were
>> >> >> essentially non-functional. Juraj Marcin pointed this out, and
>> >> >> this new patch tweaks the workaround to make it actually do
>> >> >> something useful.
>> >> >>
>> >> >> Daniel P. Berrangé (2):
>> >> >> migration: simplify error reporting after channel read
>> >> >> migration: fix workaround for gnutls thread safety
>> >> >>
>> >> >> crypto/tlssession.c | 16 ----------------
>> >> >> migration/qemu-file.c | 22 +++++++++++++++++-----
>> >> >> 2 files changed, 17 insertions(+), 21 deletions(-)
>> >> >>
>> >> >
>> >> > thanks for finding a fix for the workaround. I have tested it and it
>> >> > resolves the issue.
>> >> >
>> >> > However, it significantly slows down migration, even with the workaround
>> >> > disabled (and thus no locking). When benchmarking, I used the fixed
>> >> > version of GNUTLS, VM with 20GB of RAM which were fully written to
>> >> > before starting a normal migration with no workload during the
>> >> > migration.
>> >> >
>> >> > Test cases:
>> >> > [1]: before this patchset
>> >> > [2]: with this patchset applied and GNUTLS workaround enabled
>> >> > [2]: with this patchset applied and GNUTLS workaround disabled
>> >> >
>> >> > | Total time | Throughput | Transfered bytes |
>> >> > --+------------+------------+------------------+
>> >> > 1 | 31 192 ms | 5450 mpbs | 21 230 973 763 |
>> >> > 2 | 74 147 ms | 2291 mbps | 21 232 849 066 |
>> >> > 3 | 72 426 ms | 2343 mbps | 21 215 009 392 |
>> >>
>> >> Thanks testing this. I had just managed to convince myself that there
>> >> wouldn't be any performance issues.
>> >>
>> >> The yield at every buffer fill on the incoming side is probably way more
>> >> impactful than the poll on the RP.
>> >
>> > Yeah, that's an unacceptable penalty on the incoming side for sure.
>> >
>> > How about we simply change the outbound migration channel to be in
>> > non-blocking mode ? I originally put it in blocking mode way back
>> > in 9e4d2b98ee98f4cee50d671e500eceeefa751ee0, but if I look at the
>> > QEMUFile impl of qemu_fill_buffer and qemu_fflush, but should be
>> > coping with a non-blocking socket. qemu_fill_buffer has explicit
>> > code to wait, and qemu_fflush uses the _all() variant whcih has
>> > built-in support for waiting. So I'm not seeing an obvious need
>> > to run the channel in blocking mode.
>> >
>>
>> It's definitely simpler and I think it works. It's uncomfortably late
>> though to add a bunch of glib event loop code to the migration
>> thread. Is the suggestion of moving the yield to tlssession.c even
>> feasible?
>
> Well that'll remove the burden for the non-TLS incoming migration,
> but the incoming TLS migration will still have the redundant
> yields and so still suffer a hit.
>
> Given where we are in freeze, I'm thinking we should just hard
> disable the workaround for this release, and re-attempt it in
> next cycle and then we can bring it back to stable afterwards.
>
Yes, I agree. Will you send a patch?
> With regards,
> Daniel
next prev parent reply other threads:[~2025-08-05 15:40 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-08-01 17:02 [PATCH for-10.1 0/2] migration: actually make gnutls workaround functional Daniel P. Berrangé
2025-08-01 17:02 ` [PATCH 1/2] migration: simplify error reporting after channel read Daniel P. Berrangé
2025-08-04 10:18 ` Prasad Pandit
2025-08-04 10:22 ` Daniel P. Berrangé
2025-08-04 11:03 ` Prasad Pandit
2025-08-06 0:41 ` Peter Xu
2025-08-01 17:02 ` [PATCH 2/2] migration: fix workaround for gnutls thread safety Daniel P. Berrangé
2025-08-04 10:29 ` Prasad Pandit
2025-08-04 18:13 ` Fabiano Rosas
2025-08-04 17:53 ` [PATCH for-10.1 0/2] migration: actually make gnutls workaround functional Juraj Marcin
2025-08-04 19:27 ` Fabiano Rosas
2025-08-05 10:09 ` Daniel P. Berrangé
2025-08-05 13:44 ` Fabiano Rosas
2025-08-05 14:18 ` Daniel P. Berrangé
2025-08-05 15:28 ` Fabiano Rosas [this message]
2025-08-05 14:52 ` Juraj Marcin
2025-08-06 14:54 ` Peter Xu
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=87a54d3hzt.fsf@suse.de \
--to=farosas@suse.de \
--cc=berrange@redhat.com \
--cc=jmarcin@redhat.com \
--cc=peterx@redhat.com \
--cc=ppandit@redhat.com \
--cc=qemu-devel@nongnu.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).