From: Fiona Ebner <f.ebner@proxmox.com>
To: quintela@redhat.com
Cc: qemu-devel@nongnu.org, peterx@redhat.com, leobras@redhat.com,
eblake@redhat.com, vsementsov@yandex-team.ru, jsnow@redhat.com,
stefanha@redhat.com, fam@euphon.net, qemu-block@nongnu.org,
pbonzini@redhat.com, t.lamprecht@proxmox.com
Subject: Re: [PATCH v2] migration: hold the BQL during setup
Date: Fri, 26 May 2023 17:54:20 +0200 [thread overview]
Message-ID: <df578cfe-1151-1e27-19c5-39dff2042f77@proxmox.com> (raw)
In-Reply-To: <74785ad6-ea07-6b11-61ea-fd796daf21ad@proxmox.com>
Am 26.05.23 um 15:47 schrieb Fiona Ebner:
> Am 26.05.23 um 12:16 schrieb Juan Quintela:
>> Nak
>>
>> Sometimes it works, and sometimes it hangs.
>
> Sorry, I originally only ran the tests for x86_64 (native for me). I now
> ran into the hang too, with qtest-aarch64/migration-test and
> qtest-i386/migration-test.
>
>> Can you take a look?
>
> Will do!
>
So I took a look at the multifd_send_state->params[$i] and noticed that
the IOChannel c is still NULL and running is still false, while the
name, page_size, etc. have already been initialized.
So it seems like that socket_send_channel_create() did not manage to
execute multifd_new_send_channel_async() yet, telling from the following
in multifd_save_setup():
> p->page_size = qemu_target_page_size();
> p->page_count = page_count;
>
> if (migrate_zero_copy_send()) {
> p->write_flags = QIO_CHANNEL_WRITE_FLAG_ZERO_COPY;
> } else {
> p->write_flags = 0;
> }
>
> socket_send_channel_create(multifd_new_send_channel_async, p);
> }
I guess the execution of multifd_new_send_channel_async() after
socket_send_channel_create() somehow depends on the main thread doing
something? But the main thread is waiting on the BQL.
Should I introduce an unlocked section around multifd_send_sync_main()
in ram_save_setup() and hope for the best? The tests ran two times
without errors for me afterwards. Is there an easy way to only run the
single problematic test cases again?
There's still the risk there's something else that needs an unlocked
section. In that regard, v1 of the patch is safer, because it doesn't
change which sections are inside or outside the BQL for migration, just
for snapshot.
Best Regards,
Fiona
prev parent reply other threads:[~2023-05-26 15:55 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-05-25 16:47 [PATCH v2] migration: hold the BQL during setup Fiona Ebner
2023-05-26 8:49 ` Juan Quintela
2023-05-26 10:16 ` Juan Quintela
2023-05-26 13:47 ` Fiona Ebner
2023-05-26 15:54 ` Fiona Ebner [this message]
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=df578cfe-1151-1e27-19c5-39dff2042f77@proxmox.com \
--to=f.ebner@proxmox.com \
--cc=eblake@redhat.com \
--cc=fam@euphon.net \
--cc=jsnow@redhat.com \
--cc=leobras@redhat.com \
--cc=pbonzini@redhat.com \
--cc=peterx@redhat.com \
--cc=qemu-block@nongnu.org \
--cc=qemu-devel@nongnu.org \
--cc=quintela@redhat.com \
--cc=stefanha@redhat.com \
--cc=t.lamprecht@proxmox.com \
--cc=vsementsov@yandex-team.ru \
/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).