From: "Jason J. Herne" <jjherne@linux.ibm.com>
To: Avihai Horon <avihaih@nvidia.com>, qemu-devel@nongnu.org
Cc: "Alex Williamson" <alex@shazbot.org>,
"Cédric Le Goater" <clg@redhat.com>,
"Peter Xu" <peterx@redhat.com>, "Fabiano Rosas" <farosas@suse.de>,
"Pierrick Bouvier" <pierrick.bouvier@oss.qualcomm.com>,
"Philippe Mathieu-Daudé" <philmd@mailo.com>,
"Zhao Liu" <zhao1.liu@intel.com>,
"Halil Pasic" <pasic@linux.ibm.com>,
"Christian Borntraeger" <borntraeger@linux.ibm.com>,
"Richard Henderson" <richard.henderson@linaro.org>,
"Ilya Leoshkevich" <iii@linux.ibm.com>,
"David Hildenbrand" <david@kernel.org>,
"Eric Farman" <farman@linux.ibm.com>,
"Matthew Rosato" <mjrosato@linux.ibm.com>,
"Cornelia Huck" <cohuck@redhat.com>,
"Eric Blake" <eblake@redhat.com>,
"Vladimir Sementsov-Ogievskiy" <vsementsov@yandex-team.ru>,
"John Snow" <jsnow@redhat.com>,
"Markus Armbruster" <armbru@redhat.com>,
"Lukas Straub" <lukasstraub2@web.de>,
"Maor Gottlieb" <maorg@nvidia.com>
Subject: Re: [PATCH v5 03/16] migration: Run final save_query_pending at switchover
Date: Wed, 8 Jul 2026 10:19:49 -0400 [thread overview]
Message-ID: <6bb9a8a6-e7db-4182-ab94-6b75666be338@linux.ibm.com> (raw)
In-Reply-To: <20260706085211.13905-4-avihaih@nvidia.com>
On 7/6/26 4:51 AM, Avihai Horon wrote:
> Before switchover, the source needs one last exact pending query so
> modules can flush dirty state. This is currently done ad hoc in modules
> handlers. For example, RAM syncs its dirty bitmap in its save_complete
> handler.
>
> This should be a general concept relevant for any module, so extract it
> to migration core instead by running a final save_query_pending before
> switchover.
>
> The final query requires special handling by modules (e.g., it's called
> with BQL locked, during VM stop), so extend save_query_pending
> SaveVMHandlers callback and qemu_savevm_query_pending() with a "final"
> flag so migration modules can tell the last pending query during
> switchover from periodic iteration queries.
>
> Call final pending query also in COLO checkpoint, which needs to flush
> dirty state before the checkpoint's live state is saved. Unlike a
> regular switchover, COLO reaches completion repeatedly for every
> checkpoint, so this must be done on each one.
>
> Signed-off-by: Avihai Horon <avihaih@nvidia.com>
> ---
> include/migration/register.h | 41 ++++++++++++++++++----------------
> migration/savevm.h | 3 ++-
> hw/s390x/s390-stattrib.c | 2 +-
> hw/vfio/migration.c | 11 ++++++---
> migration/block-dirty-bitmap.c | 11 ++++++---
> migration/colo.c | 10 +++++++++
> migration/migration.c | 14 ++++++++++--
> migration/ram.c | 40 +++++++++++++++++++--------------
> migration/savevm.c | 20 +++++++++++++----
> hw/vfio/trace-events | 2 +-
> migration/trace-events | 2 +-
> 11 files changed, 104 insertions(+), 52 deletions(-)
For the s390 piece...
Reviewed-by: Jason J. Herne <jjherne@linux.ibm.com>
next prev parent reply other threads:[~2026-07-08 14:20 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-06 8:51 [PATCH v5 00/16] Make switchover-ack re-usable and add VFIO precopy REINIT feature Avihai Horon
2026-07-06 8:51 ` [PATCH v5 01/16] migration: Propagate errors in migration_completion_precopy() Avihai Horon
2026-07-06 8:51 ` [PATCH v5 02/16] migration/ram: Use migration_bitmap_sync_precopy() for postcopy discard Avihai Horon
2026-07-06 8:51 ` [PATCH v5 03/16] migration: Run final save_query_pending at switchover Avihai Horon
2026-07-06 11:40 ` Cédric Le Goater
2026-07-07 10:16 ` Lukas Straub
2026-07-07 12:17 ` Cédric Le Goater
2026-07-08 14:19 ` Jason J. Herne [this message]
2026-07-06 8:51 ` [PATCH v5 04/16] migration: Log the approver in qemu_loadvm_approve_switchover() Avihai Horon
2026-07-06 8:52 ` [PATCH v5 05/16] migration: Replace switchover_ack_needed SaveVMHandler Avihai Horon
2026-07-06 8:52 ` [PATCH v5 06/16] migration: Rename switchover-ack code to legacy Avihai Horon
2026-07-06 8:52 ` [PATCH v5 07/16] migration: Make switchover-ack re-usable Avihai Horon
2026-07-07 10:17 ` Lukas Straub
2026-07-06 8:52 ` [PATCH v5 08/16] migration: Fail migration if switchover-ack is requested after switchover decision Avihai Horon
2026-07-07 10:17 ` Lukas Straub
2026-07-06 8:52 ` [PATCH v5 09/16] vfio/migration: Extract VFIO_MIG_FLAG_DEV_INIT_DATA_SENT sending to helper Avihai Horon
2026-07-06 8:52 ` [PATCH v5 10/16] vfio/migration: Add Error ** parameter to vfio_migration_init() Avihai Horon
2026-07-06 8:52 ` [PATCH v5 11/16] vfio/migration: Add new switchover-ack mechanism Avihai Horon
2026-07-06 8:52 ` [PATCH v5 12/16] vfio/migration: Implement VFIO_PRECOPY_INFO_REINIT feature Avihai Horon
2026-07-06 8:52 ` [PATCH v5 13/16] vfio/migration: Check VFIO_PRECOPY_INFO_REINIT during switchover Avihai Horon
2026-07-06 8:52 ` [PATCH v5 14/16] migration: Enable new switchover-ack Avihai Horon
2026-07-06 8:52 ` [PATCH v5 15/16] migration: Refactor migration_completion_precopy() to return bool Avihai Horon
2026-07-06 11:38 ` Cédric Le Goater
2026-07-06 8:52 ` [PATCH v5 16/16] migration: Fix "switchover" used as a verb in comments and docs Avihai Horon
2026-07-06 11:38 ` Cédric Le Goater
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=6bb9a8a6-e7db-4182-ab94-6b75666be338@linux.ibm.com \
--to=jjherne@linux.ibm.com \
--cc=alex@shazbot.org \
--cc=armbru@redhat.com \
--cc=avihaih@nvidia.com \
--cc=borntraeger@linux.ibm.com \
--cc=clg@redhat.com \
--cc=cohuck@redhat.com \
--cc=david@kernel.org \
--cc=eblake@redhat.com \
--cc=farman@linux.ibm.com \
--cc=farosas@suse.de \
--cc=iii@linux.ibm.com \
--cc=jsnow@redhat.com \
--cc=lukasstraub2@web.de \
--cc=maorg@nvidia.com \
--cc=mjrosato@linux.ibm.com \
--cc=pasic@linux.ibm.com \
--cc=peterx@redhat.com \
--cc=philmd@mailo.com \
--cc=pierrick.bouvier@oss.qualcomm.com \
--cc=qemu-devel@nongnu.org \
--cc=richard.henderson@linaro.org \
--cc=vsementsov@yandex-team.ru \
--cc=zhao1.liu@intel.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.