From: "Michael S. Tsirkin" <mst@redhat.com>
To: Prasad Pandit <ppandit@redhat.com>
Cc: qemu-devel@nongnu.org, farosas@suse.de, jasowang@redhat.com,
mcoqueli@redhat.com, peterx@redhat.com,
"Prasad Pandit" <pjp@fedoraproject.org>,
"Dr. David Alan Gilbert" <dgilbert@redhat.com>,
"Marc-André Lureau" <marcandre.lureau@redhat.com>
Subject: Re: [PATCH v2 2/2] vhost-user: add a request-reply lock
Date: Thu, 29 Aug 2024 05:21:49 -0400 [thread overview]
Message-ID: <20240829052033-mutt-send-email-mst@kernel.org> (raw)
In-Reply-To: <CAE8KmOzC__Z6wgSv9sGcAPrbbZBOQg7tD=6An-=XZVouPCA2Bg@mail.gmail.com>
On Thu, Aug 29, 2024 at 02:45:45PM +0530, Prasad Pandit wrote:
> Hello Michael,
>
> On Thu, 29 Aug 2024 at 13:12, Michael S. Tsirkin <mst@redhat.com> wrote:
> > Weird. Seems to indicate some kind of deadlock?
>
> * Such a deadlock should occur across all environments I guess, not
> sure why it happens selectively. It is strange.
Some kind of race?
> > So maybe vhost_user_postcopy_end should take the BQL?
> ===
> diff --git a/migration/savevm.c b/migration/savevm.c
> index e7c1215671..31acda3818 100644
> --- a/migration/savevm.c
> +++ b/migration/savevm.c
> @@ -2050,7 +2050,9 @@ static void *postcopy_ram_listen_thread(void *opaque)
> */
> qemu_event_wait(&mis->main_thread_load_event);
> }
> + bql_lock();
> postcopy_ram_incoming_cleanup(mis);
> + bql_unlock();
>
> if (load_res < 0) {
> /*
> ===
>
> * Actually a BQL patch above was tested and it worked fine. But not
> sure if it is an acceptable solution. Another contention was taking
> BQL could make things more complicated, so a local vhost-user specific
> lock should be better.
>
> ...wdyt?
> ---
> - Prasad
Keep it simple, is my advice. Not causing regressions is good.
--
MST
next prev parent reply other threads:[~2024-08-29 9:22 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-08-28 10:09 [PATCH v2 0/2] Postcopy migration and vhost-user errors Prasad Pandit
2024-08-28 10:09 ` [PATCH v2 1/2] vhost: fail device start if iotlb update fails Prasad Pandit
2024-08-28 10:09 ` [PATCH v2 2/2] vhost-user: add a request-reply lock Prasad Pandit
2024-08-28 11:15 ` Michael S. Tsirkin
2024-08-29 5:39 ` Prasad Pandit
2024-08-29 6:23 ` Michael S. Tsirkin
2024-08-29 7:42 ` Michael S. Tsirkin
2024-08-29 9:15 ` Prasad Pandit
2024-08-29 9:21 ` Michael S. Tsirkin [this message]
2024-08-29 14:29 ` Peter Xu
2024-08-29 15:05 ` Michael S. Tsirkin
2024-08-29 20:29 ` Peter Xu
2024-09-10 17:10 ` [PATCH v2 0/2] Postcopy migration and vhost-user errors Michael S. Tsirkin
2024-09-11 7:14 ` Prasad Pandit
2024-09-11 9:46 ` Michael S. Tsirkin
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=20240829052033-mutt-send-email-mst@kernel.org \
--to=mst@redhat.com \
--cc=dgilbert@redhat.com \
--cc=farosas@suse.de \
--cc=jasowang@redhat.com \
--cc=marcandre.lureau@redhat.com \
--cc=mcoqueli@redhat.com \
--cc=peterx@redhat.com \
--cc=pjp@fedoraproject.org \
--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).