diff options
author | Yishai Hadas <yishaih@nvidia.com> | 2023-01-24 16:49:55 +0200 |
---|---|---|
committer | Alex Williamson <alex.williamson@redhat.com> | 2023-01-30 12:16:15 -0700 |
commit | f4f0c25e5d726e353369258b5ce28a01bd71aa47 (patch) | |
tree | d503f64863fd58face6ffaa9c2595bcfae466323 /drivers/vfio/pci/mlx5/cmd.h | |
parent | b04e2e86e919633825728007484508dbdc44c7bb (diff) | |
download | lwn-f4f0c25e5d726e353369258b5ce28a01bd71aa47.tar.gz lwn-f4f0c25e5d726e353369258b5ce28a01bd71aa47.zip |
vfio/mlx5: Improve the target side flow to reduce downtime
Improve the target side flow to reduce downtime as of below.
- Support reading an optional record which includes the expected
stop_copy size.
- Once the source sends this record data, which expects to be sent as
part of the pre_copy flow, prepare the data buffers that may be large
enough to hold the final stop_copy data.
The above reduces the migration downtime as the relevant stuff that is
needed to load the image data is prepared ahead as part of pre_copy.
Signed-off-by: Yishai Hadas <yishaih@nvidia.com>
Link: https://lore.kernel.org/r/20230124144955.139901-4-yishaih@nvidia.com
Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
Diffstat (limited to 'drivers/vfio/pci/mlx5/cmd.h')
-rw-r--r-- | drivers/vfio/pci/mlx5/cmd.h | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/vfio/pci/mlx5/cmd.h b/drivers/vfio/pci/mlx5/cmd.h index 8f1bef580028..aec4c69dd6c1 100644 --- a/drivers/vfio/pci/mlx5/cmd.h +++ b/drivers/vfio/pci/mlx5/cmd.h @@ -27,6 +27,8 @@ enum mlx5_vf_migf_state { enum mlx5_vf_load_state { MLX5_VF_LOAD_STATE_READ_IMAGE_NO_HEADER, MLX5_VF_LOAD_STATE_READ_HEADER, + MLX5_VF_LOAD_STATE_PREP_HEADER_DATA, + MLX5_VF_LOAD_STATE_READ_HEADER_DATA, MLX5_VF_LOAD_STATE_PREP_IMAGE, MLX5_VF_LOAD_STATE_READ_IMAGE, MLX5_VF_LOAD_STATE_LOAD_IMAGE, @@ -59,7 +61,6 @@ struct mlx5_vhca_data_buffer { loff_t start_pos; u64 length; u64 allocated_length; - u64 header_image_size; u32 mkey; enum dma_data_direction dma_dir; u8 dmaed:1; @@ -89,6 +90,9 @@ struct mlx5_vf_migration_file { enum mlx5_vf_load_state load_state; u32 pdn; loff_t max_pos; + u64 record_size; + u32 record_tag; + u64 stop_copy_prep_size; u64 pre_copy_initial_bytes; struct mlx5_vhca_data_buffer *buf; struct mlx5_vhca_data_buffer *buf_header; |