mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH vhost v2 00/10] vdpa/mlx5: Parallelize device suspend/resume
@ 2024-08-16  9:01 Dragos Tatulea
  2024-08-16  9:01 ` [PATCH mlx5-vhost v2 01/10] net/mlx5: Support throttled commands from async API Dragos Tatulea
                   ` (10 more replies)
  0 siblings, 11 replies; 25+ messages in thread
From: Dragos Tatulea @ 2024-08-16  9:01 UTC (permalink / raw)
  To: Michael S . Tsirkin, Jason Wang, Eugenio Perez Martin, virtualization
  Cc: Dragos Tatulea, Si-Wei Liu, Saeed Mahameed, Leon Romanovsky, kvm,
	linux-kernel, Gal Pressman, Parav Pandit, Xuan Zhuo

This series parallelizes the mlx5_vdpa device suspend and resume
operations through the firmware async API. The purpose is to reduce live
migration downtime.

The series starts with changing the VQ suspend and resume commands
to the async API. After that, the switch is made to issue multiple
commands of the same type in parallel.

Then, the an additional improvement is added: keep the notifiers enabled
during suspend but make it a NOP. Upon resume make sure that the link
state is forwarded. This shaves around 30ms per device constant time.

Finally, use parallel VQ suspend and resume during the CVQ MQ command.

For 1 vDPA device x 32 VQs (16 VQPs), on a large VM (256 GB RAM, 32 CPUs
x 2 threads per core), the improvements are:

+-------------------+--------+--------+-----------+
| operation         | Before | After  | Reduction |
|-------------------+--------+--------+-----------|
| mlx5_vdpa_suspend | 37 ms  | 2.5 ms |     14x   |
| mlx5_vdpa_resume  | 16 ms  | 5 ms   |      3x   |
+-------------------+--------+--------+-----------+

---
v2:
- Changed to parallel VQ suspend/resume during CVQ MQ command.
  Support added in the last 2 patches.
- Made the fw async command more generic and moved it to resources.c.
  Did that because the following series (parallel mkey ops) needs this
  code as well.
  Dropped Acked-by from Eugenio on modified patches.
- Fixed kfree -> kvfree.
- Removed extra newline caught during review.
- As discussed in the v1, the series can be pulled in completely in
  the vhost tree [0]. The mlx5_core patch was reviewed by Tariq who is
  also a maintainer for mlx5_core.

[0] - https://lore.kernel.org/virtualization/6582792d-8db2-4bc0-bf3a-248fe5c8fc56@nvidia.com/T/#maefabb2fde5adfb322d16ca16ae64d540f75b7d2

Dragos Tatulea (10):
  net/mlx5: Support throttled commands from async API
  vdpa/mlx5: Introduce error logging function
  vdpa/mlx5: Introduce async fw command wrapper
  vdpa/mlx5: Use async API for vq query command
  vdpa/mlx5: Use async API for vq modify commands
  vdpa/mlx5: Parallelize device suspend
  vdpa/mlx5: Parallelize device resume
  vdpa/mlx5: Keep notifiers during suspend but ignore
  vdpa/mlx5: Small improvement for change_num_qps()
  vdpa/mlx5: Parallelize VQ suspend/resume for CVQ MQ command

 drivers/net/ethernet/mellanox/mlx5/core/cmd.c |  21 +-
 drivers/vdpa/mlx5/core/mlx5_vdpa.h            |  22 +
 drivers/vdpa/mlx5/core/resources.c            |  73 ++++
 drivers/vdpa/mlx5/net/mlx5_vnet.c             | 396 +++++++++++-------
 4 files changed, 361 insertions(+), 151 deletions(-)

-- 
2.45.1


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

end of thread, other threads:[~2024-09-11 17:05 UTC | newest]

Thread overview: 25+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-08-16  9:01 [PATCH vhost v2 00/10] vdpa/mlx5: Parallelize device suspend/resume Dragos Tatulea
2024-08-16  9:01 ` [PATCH mlx5-vhost v2 01/10] net/mlx5: Support throttled commands from async API Dragos Tatulea
2024-09-09  9:32   ` Dragos Tatulea
2024-09-11  8:00     ` Eugenio Perez Martin
2024-09-11 17:05       ` Dragos Tatulea
2024-08-16  9:01 ` [PATCH vhost v2 02/10] vdpa/mlx5: Introduce error logging function Dragos Tatulea
2024-08-16  9:01 ` [PATCH vhost v2 03/10] vdpa/mlx5: Introduce async fw command wrapper Dragos Tatulea
2024-08-28 12:34   ` Eugenio Perez Martin
2024-08-16  9:01 ` [PATCH vhost v2 04/10] vdpa/mlx5: Use async API for vq query command Dragos Tatulea
2024-08-28 12:34   ` Eugenio Perez Martin
2024-08-16  9:01 ` [PATCH vhost v2 05/10] vdpa/mlx5: Use async API for vq modify commands Dragos Tatulea
2024-08-28 12:35   ` Eugenio Perez Martin
2024-08-16  9:01 ` [PATCH vhost v2 06/10] vdpa/mlx5: Parallelize device suspend Dragos Tatulea
2024-08-16  9:01 ` [PATCH vhost v2 07/10] vdpa/mlx5: Parallelize device resume Dragos Tatulea
2024-08-16  9:01 ` [PATCH vhost v2 08/10] vdpa/mlx5: Keep notifiers during suspend but ignore Dragos Tatulea
2024-08-16  9:01 ` [PATCH vhost v2 09/10] vdpa/mlx5: Small improvement for change_num_qps() Dragos Tatulea
2024-08-28 12:48   ` Eugenio Perez Martin
2024-08-16  9:01 ` [PATCH vhost v2 10/10] vdpa/mlx5: Parallelize VQ suspend/resume for CVQ MQ command Dragos Tatulea
2024-08-28 12:59   ` Eugenio Perez Martin
     [not found] ` <CAJaqyWfwkNUYcMWwG4LthhYEquUYDJPRvHeyh9C_R-ioeFYuXw@mail.gmail.com>
2024-09-02 10:03   ` [PATCH vhost v2 00/10] vdpa/mlx5: Parallelize device suspend/resume Lei Yang
2024-09-02 11:05     ` Dragos Tatulea
2024-09-03  7:40       ` Lei Yang
2024-09-03  7:47         ` Dragos Tatulea
2024-09-03  8:10           ` Eugenio Perez Martin
2024-09-03  8:16             ` Dragos Tatulea

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®