On Tue, Jun 24, 2025 at 04:36:39PM +0200, Juraj Marcin wrote: [...]
> There are still mentions of 'save_live_complete_precopy' in: > > include/migration/register.h:100 > * parallel with @save_live_complete_precopy handlers. > docs/devel/migration/vfio.rst:78 > * A ``save_live_complete_precopy`` function that sets the VFIO device > in > docs/devel/migration/vfio.rst:198 > .save_live_complete_precopy() is called for each active device > docs/devel/migration/vfio.rst:200 > .save_live_complete_precopy() until > docs/devel/migration/main.rst:511 > - A ``save_live_complete_precopy`` function that must transmit the Good catch. If I prepare this fixup to be squashed, can I get your R-b? >From 58147b11276fa193c25f35e63f41a8e34d444dd9 Mon Sep 17 00:00:00 2001 From: Peter Xu <pet...@redhat.com> Date: Tue, 24 Jun 2025 11:38:17 -0400 Subject: [PATCH] fixup! migration: Rename save_live_complete_precopy to save_complete Signed-off-by: Peter Xu <pet...@redhat.com> --- docs/devel/migration/main.rst | 4 ++-- docs/devel/migration/vfio.rst | 12 ++++++------ include/migration/register.h | 2 +- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/docs/devel/migration/main.rst b/docs/devel/migration/main.rst index cdd4f4a6d7..6493c1d2bc 100644 --- a/docs/devel/migration/main.rst +++ b/docs/devel/migration/main.rst @@ -508,8 +508,8 @@ An iterative device must provide: the point that stream bandwidth limits tell it to stop. Each call generates one section. - - A ``save_live_complete_precopy`` function that must transmit the - last section for the device containing any remaining data. + - A ``save_complete`` function that must transmit the last section for + the device containing any remaining data. - A ``load_state`` function used to load sections generated by any of the save functions that generate sections. diff --git a/docs/devel/migration/vfio.rst b/docs/devel/migration/vfio.rst index 673e354754..8ff5ab0c74 100644 --- a/docs/devel/migration/vfio.rst +++ b/docs/devel/migration/vfio.rst @@ -75,10 +75,10 @@ VFIO implements the device hooks for the iterative approach as follows: in the non-multifd mode. In the multifd mode it just emits either a dummy EOS marker. -* A ``save_live_complete_precopy`` function that sets the VFIO device in - _STOP_COPY state and iteratively copies the data for the VFIO device until - the vendor driver indicates that no data remains. - In the multifd mode it just emits a dummy EOS marker. +* A ``save_complete`` function that sets the VFIO device in _STOP_COPY + state and iteratively copies the data for the VFIO device until the + vendor driver indicates that no data remains. In the multifd mode it + just emits a dummy EOS marker. * A ``save_live_complete_precopy_thread`` function that in the multifd mode provides thread handler performing multifd device state transfer. @@ -195,9 +195,9 @@ Live migration save path | Then the VFIO device is put in _STOP_COPY state (FINISH_MIGRATE, _ACTIVE, _STOP_COPY) - .save_live_complete_precopy() is called for each active device + .save_complete() is called for each active device For the VFIO device: in the non-multifd mode iterate in - .save_live_complete_precopy() until + .save_complete() until pending data is 0 In the multifd mode this iteration is done in .save_live_complete_precopy_thread() instead. diff --git a/include/migration/register.h b/include/migration/register.h index 0510534515..2a26e76a68 100644 --- a/include/migration/register.h +++ b/include/migration/register.h @@ -103,7 +103,7 @@ typedef struct SaveVMHandlers { * Called at the end of a precopy phase from a separate worker thread * in configurations where multifd device state transfer is supported * in order to perform asynchronous transmission of the remaining data in - * parallel with @save_live_complete_precopy handlers. + * parallel with @save_complete handlers. * When postcopy is enabled, devices that support postcopy will skip this * step. * -- 2.49.0 > > Also, should we also drop "live" from > 'save_live_complete_precopy_thread' as well? IIUC they are called > together with (now) 'save_complete()' during precopy. Agreed, though it's better done in a separate one. If so, wanna send a patch? :) PS: would be nice if on top of this series, then I can collect them together. Thanks! -- Peter Xu