All of lore.kernel.org
 help / color / mirror / Atom feed
From: Juraj Marcin <jmarcin@redhat.com>
To: Pranav Tyagi <prtyagi@redhat.com>
Cc: qemu-devel@nongnu.org, Peter Xu <peterx@redhat.com>,
	 Fabiano Rosas <farosas@suse.de>,
	Prasad Pandit <ppandit@redhat.com>
Subject: Re: [PATCH v2] migration: Fix blocking in POSTCOPY_DEVICE during package load
Date: Fri, 24 Apr 2026 12:33:02 +0200	[thread overview]
Message-ID: <aetGyqrqEdz2dLnc@fedora> (raw)
In-Reply-To: <20260423094438.43556-1-prtyagi@redhat.com>

On 2026-04-23 15:14, Pranav Tyagi wrote:
> The package_loaded event is not set in case MIG_RP_MSG_PONG does not
> arrive on the source from the destination in the return path thread. The
> migration thread would then be blocked waiting for package_loaded event
> indefinitely in POSTCOPY_DEVICE state. Where as, in such a condition the
> source VM can safely resume as the destination has not yet started. The
> pong message can get lost in case of a network failure or destination
> crash before sending the pong.
> 
> This patch removes the package_loaded event and uses rp_sem, instead of
> kicking multiple events. The error is detected in case of network
> failure or destination crash and rp_sem is set in the out path of the
> return path thread. This will kick the migration thread out from a
> condition of indefinitely waiting for rp_sem. The migration thread then
> fails early and breaks from the migration loop to resume the vm on the
> source side.
> 
> Fixes: 7b842fe354c6 ("migration: Introduce POSTCOPY_DEVICE state")
> Signed-off-by: Pranav Tyagi <prtyagi@redhat.com>
> ---
> V1: https://lore.kernel.org/all/20260421052227.8278-1-prtyagi@redhat.com/
> 
> changed in v2:
> - removed postcopy_package_loaded_event and using rp_sem to kick the
>   migration thread
> - using migration_rp_wait() in place of qemu_event_wait() in the
>   migration thread
> 
>  migration/migration.c | 48 ++++++++++++++++++++++++++++---------------
>  migration/migration.h |  1 -
>  2 files changed, 31 insertions(+), 18 deletions(-)

Reviewed-by: Juraj Marcin <jmarcin@redhat.com>



  parent reply	other threads:[~2026-04-24 10:33 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-04-23  9:44 [PATCH v2] migration: Fix blocking in POSTCOPY_DEVICE during package load Pranav Tyagi
2026-04-23 19:12 ` Peter Xu
2026-04-24  4:48   ` Pranav Tyagi
2026-04-24 10:32   ` Juraj Marcin
2026-04-24 10:33 ` Juraj Marcin [this message]
2026-04-24 14:00   ` 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=aetGyqrqEdz2dLnc@fedora \
    --to=jmarcin@redhat.com \
    --cc=farosas@suse.de \
    --cc=peterx@redhat.com \
    --cc=ppandit@redhat.com \
    --cc=prtyagi@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 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.