netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH vhost 00/23] vdpa/mlx5: Pre-create HW VQs to reduce LM downtime
@ 2024-06-17 15:07 Dragos Tatulea
  2024-06-17 15:07 ` [PATCH vhost 01/23] vdpa/mlx5: Clarify meaning thorough function rename Dragos Tatulea
                   ` (22 more replies)
  0 siblings, 23 replies; 53+ messages in thread
From: Dragos Tatulea @ 2024-06-17 15:07 UTC (permalink / raw)
  To: Michael S. Tsirkin, Jason Wang, Xuan Zhuo, Eugenio Pérez,
	Saeed Mahameed, Leon Romanovsky, Tariq Toukan, Si-Wei Liu
  Cc: virtualization, linux-kernel, linux-rdma, netdev, Dragos Tatulea,
	Cosmin Ratiu

According to the measurements for vDPA Live Migration downtime [0], one
large source of downtime is the creation of hardware VQs and their
associated resources on the devices on the destination VM.

Previous series ([1], [2]) addressed the source part of the Live
Migration downtime. This series addresses the destination part: instead
of creating hardware VQs and their dependent resources when the device
goes into the DRIVER_OK state (which is during downtime), create "blank"
VQs at device creation time and only modify them to the received
configuration before starting the VQs (DRIVER_OK state).

The caveat here is that mlx5_vdpa VQs don't support modifying the VQ
size. VQs will be created with a convenient default size and when this
size is changed, they will be recreated.

The beginning of the series consists of refactorings and preparation.

After that, some preparations are made:
- Allow creation of "blank" VQs by not configuring them during
  create_virtqueue() if there are no modified fields.
- The VQ Init to Ready state transition is consolidated into the
  resume_vq().
- Add error handling to suspend/resume code paths.

Then VQs are created at device creation time.

Finally, the special cases that need full VQ resource recreation are
handled.

On a 64 CPU, 256 GB VM with 1 vDPA device of 16 VQps, the full VQ
resource creation + resume time was ~370ms. Now it's down to 60 ms
(only VQ config and resume). The measurements were done on a ConnectX6DX
based vDPA device.

[0] https://lore.kernel.org/qemu-devel/1701970793-6865-1-git-send-email-si-wei.liu@oracle.com/
[1] https://lore.kernel.org/lkml/20231018171456.1624030-2-dtatulea@nvidia.com
[2] https://lore.kernel.org/lkml/20231219180858.120898-1-dtatulea@nvidia.com

---
Dragos Tatulea (23):
      vdpa/mlx5: Clarify meaning thorough function rename
      vdpa/mlx5: Make setup/teardown_vq_resources() symmetrical
      vdpa/mlx5: Drop redundant code
      vdpa/mlx5: Drop redundant check in teardown_virtqueues()
      vdpa/mlx5: Iterate over active VQs during suspend/resume
      vdpa/mlx5: Remove duplicate suspend code
      vdpa/mlx5: Initialize and reset device with one queue pair
      vdpa/mlx5: Clear and reinitialize software VQ data on reset
      vdpa/mlx5: Add support for modifying the virtio_version VQ field
      vdpa/mlx5: Add support for modifying the VQ features field
      vdpa/mlx5: Set an initial size on the VQ
      vdpa/mlx5: Start off rqt_size with max VQPs
      vdpa/mlx5: Set mkey modified flags on all VQs
      vdpa/mlx5: Allow creation of blank VQs
      vdpa/mlx5: Accept Init -> Ready VQ transition in resume_vq()
      vdpa/mlx5: Add error code for suspend/resume VQ
      vdpa/mlx5: Consolidate all VQ modify to Ready to use resume_vq()
      vdpa/mlx5: Forward error in suspend/resume device
      vdpa/mlx5: Use suspend/resume during VQP change
      vdpa/mlx5: Pre-create hardware VQs at vdpa .dev_add time
      vdpa/mlx5: Re-create HW VQs under certain conditions
      vdpa/mlx5: Don't reset VQs more than necessary
      vdpa/mlx5: Don't enable non-active VQs in .set_vq_ready()

 drivers/vdpa/mlx5/net/mlx5_vnet.c  | 422 +++++++++++++++++++++++++------------
 drivers/vdpa/mlx5/net/mlx5_vnet.h  |   2 +
 include/linux/mlx5/mlx5_ifc_vdpa.h |   2 +
 3 files changed, 291 insertions(+), 135 deletions(-)
---
base-commit: c8fae27d141a32a1624d0d0d5419d94252824498
change-id: 20240617-stage-vdpa-vq-precreate-76df151bed08

Best regards,
-- 
Dragos Tatulea <dtatulea@nvidia.com>


^ permalink raw reply	[flat|nested] 53+ messages in thread

end of thread, other threads:[~2024-07-08 16:43 UTC | newest]

Thread overview: 53+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-06-17 15:07 [PATCH vhost 00/23] vdpa/mlx5: Pre-create HW VQs to reduce LM downtime Dragos Tatulea
2024-06-17 15:07 ` [PATCH vhost 01/23] vdpa/mlx5: Clarify meaning thorough function rename Dragos Tatulea
2024-06-19 10:37   ` Eugenio Perez Martin
2024-06-17 15:07 ` [PATCH vhost 02/23] vdpa/mlx5: Make setup/teardown_vq_resources() symmetrical Dragos Tatulea
2024-06-19 10:38   ` Eugenio Perez Martin
2024-06-17 15:07 ` [PATCH vhost 03/23] vdpa/mlx5: Drop redundant code Dragos Tatulea
2024-06-19 10:55   ` Eugenio Perez Martin
2024-06-17 15:07 ` [PATCH vhost 04/23] vdpa/mlx5: Drop redundant check in teardown_virtqueues() Dragos Tatulea
2024-06-19 10:56   ` Eugenio Perez Martin
2024-06-17 15:07 ` [PATCH vhost 05/23] vdpa/mlx5: Iterate over active VQs during suspend/resume Dragos Tatulea
2024-06-19 11:04   ` Eugenio Perez Martin
2024-06-17 15:07 ` [PATCH vhost 06/23] vdpa/mlx5: Remove duplicate suspend code Dragos Tatulea
2024-06-19 11:02   ` Eugenio Perez Martin
2024-06-17 15:07 ` [PATCH vhost 07/23] vdpa/mlx5: Initialize and reset device with one queue pair Dragos Tatulea
2024-06-17 15:07 ` [PATCH vhost 08/23] vdpa/mlx5: Clear and reinitialize software VQ data on reset Dragos Tatulea
2024-06-19 11:28   ` Eugenio Perez Martin
2024-06-19 17:03     ` Dragos Tatulea
2024-06-17 15:07 ` [PATCH vhost 09/23] vdpa/mlx5: Add support for modifying the virtio_version VQ field Dragos Tatulea
2024-06-17 15:07 ` [PATCH vhost 10/23] vdpa/mlx5: Add support for modifying the VQ features field Dragos Tatulea
2024-06-17 15:07 ` [PATCH vhost 11/23] vdpa/mlx5: Set an initial size on the VQ Dragos Tatulea
2024-06-19 15:08   ` Eugenio Perez Martin
2024-06-19 17:06     ` Dragos Tatulea
2024-06-17 15:07 ` [PATCH vhost 12/23] vdpa/mlx5: Start off rqt_size with max VQPs Dragos Tatulea
2024-06-19 15:33   ` Eugenio Perez Martin
2024-06-17 15:07 ` [PATCH vhost 13/23] vdpa/mlx5: Set mkey modified flags on all VQs Dragos Tatulea
2024-06-19 15:33   ` Eugenio Perez Martin
2024-06-17 15:07 ` [PATCH vhost 14/23] vdpa/mlx5: Allow creation of blank VQs Dragos Tatulea
2024-06-17 15:07 ` [PATCH vhost 15/23] vdpa/mlx5: Accept Init -> Ready VQ transition in resume_vq() Dragos Tatulea
2024-06-17 15:07 ` [PATCH vhost 16/23] vdpa/mlx5: Add error code for suspend/resume VQ Dragos Tatulea
2024-06-19 15:41   ` Eugenio Perez Martin
2024-06-17 15:07 ` [PATCH vhost 17/23] vdpa/mlx5: Consolidate all VQ modify to Ready to use resume_vq() Dragos Tatulea
2024-06-19 15:43   ` Eugenio Perez Martin
2024-06-17 15:07 ` [PATCH vhost 18/23] vdpa/mlx5: Forward error in suspend/resume device Dragos Tatulea
2024-06-23 11:19   ` Zhu Yanjun
2024-06-26  9:28     ` Dragos Tatulea
2024-06-17 15:07 ` [PATCH vhost 19/23] vdpa/mlx5: Use suspend/resume during VQP change Dragos Tatulea
2024-06-19 15:46   ` Eugenio Perez Martin
2024-06-17 15:07 ` [PATCH vhost 20/23] vdpa/mlx5: Pre-create hardware VQs at vdpa .dev_add time Dragos Tatulea
2024-06-19 15:54   ` Eugenio Perez Martin
2024-06-26  9:27     ` Dragos Tatulea
2024-07-03 16:01       ` Eugenio Perez Martin
2024-07-08 11:01         ` Dragos Tatulea
2024-07-08 11:11           ` Michael S. Tsirkin
2024-07-08 11:17             ` Dragos Tatulea
2024-07-08 11:25               ` Michael S. Tsirkin
2024-07-08 16:22   ` Zhu Yanjun
2024-07-08 16:43     ` Dragos Tatulea
2024-06-17 15:07 ` [PATCH vhost 21/23] vdpa/mlx5: Re-create HW VQs under certain conditions Dragos Tatulea
2024-06-19 16:04   ` Eugenio Perez Martin
2024-06-17 15:07 ` [PATCH vhost 22/23] vdpa/mlx5: Don't reset VQs more than necessary Dragos Tatulea
2024-06-19 16:14   ` Eugenio Perez Martin
2024-06-17 15:07 ` [PATCH vhost 23/23] vdpa/mlx5: Don't enable non-active VQs in .set_vq_ready() Dragos Tatulea
2024-06-19 16:39   ` Eugenio Perez Martin

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).