From: Dragos Tatulea <dtatulea@nvidia.com>
To: "Saeed Mahameed" <saeedm@nvidia.com>,
"Leon Romanovsky" <leon@kernel.org>,
"Tariq Toukan" <tariqt@nvidia.com>,
"David S. Miller" <davem@davemloft.net>,
"Eric Dumazet" <edumazet@google.com>,
"Jakub Kicinski" <kuba@kernel.org>,
"Paolo Abeni" <pabeni@redhat.com>,
"Dragos Tatulea" <dtatulea@nvidia.com>,
"Michael S. Tsirkin" <mst@redhat.com>,
"Jason Wang" <jasowang@redhat.com>,
"Xuan Zhuo" <xuanzhuo@linux.alibaba.com>,
"Eugenio Pérez" <eperezma@redhat.com>
Cc: Si-Wei Liu <si-wei.liu@oracle.com>, <netdev@vger.kernel.org>,
<linux-rdma@vger.kernel.org>, <linux-kernel@vger.kernel.org>,
<virtualization@lists.linux.dev>
Subject: [PATCH vhost 0/7] vdpa/mlx5: Parallelize device suspend/resume
Date: Fri, 2 Aug 2024 10:20:17 +0300 [thread overview]
Message-ID: <20240802072039.267446-1-dtatulea@nvidia.com> (raw)
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.
Finally, a bonus improvement is thrown in: keep the notifierd 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.
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 |
+-------------------+--------+--------+-----------+
Note for the maintainers:
The first patch contains changes for mlx5_core. This must be applied
into the mlx5-vhost tree [0] first. Once this patch is applied on
mlx5-vhost, the change has to be pulled from mlx5-vdpa into the vhost
tree and only then the remaining patches can be applied.
[0] https://git.kernel.org/pub/scm/linux/kernel/git/mellanox/linux.git/log/?h=mlx5-vhost
Dragos Tatulea (7):
net/mlx5: Support throttled commands from async API
vdpa/mlx5: Introduce error logging function
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
drivers/net/ethernet/mellanox/mlx5/core/cmd.c | 21 +-
drivers/vdpa/mlx5/core/mlx5_vdpa.h | 7 +
drivers/vdpa/mlx5/net/mlx5_vnet.c | 435 +++++++++++++-----
3 files changed, 333 insertions(+), 130 deletions(-)
--
2.45.2
next reply other threads:[~2024-08-02 7:24 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-08-02 7:20 Dragos Tatulea [this message]
2024-08-02 7:20 ` [PATCH mlx5-vhost 1/7] net/mlx5: Support throttled commands from async API Dragos Tatulea
2024-08-02 13:14 ` [PATCH vhost 0/7] vdpa/mlx5: Parallelize device suspend/resume Michael S. Tsirkin
2024-08-04 8:48 ` Leon Romanovsky
2024-08-04 13:39 ` Michael S. Tsirkin
2024-08-04 14:52 ` Leon Romanovsky
2024-08-16 9:13 ` Dragos Tatulea
2024-08-07 13:25 ` Eugenio Perez Martin
2024-08-07 14:54 ` Dragos Tatulea
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=20240802072039.267446-1-dtatulea@nvidia.com \
--to=dtatulea@nvidia.com \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=eperezma@redhat.com \
--cc=jasowang@redhat.com \
--cc=kuba@kernel.org \
--cc=leon@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-rdma@vger.kernel.org \
--cc=mst@redhat.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=saeedm@nvidia.com \
--cc=si-wei.liu@oracle.com \
--cc=tariqt@nvidia.com \
--cc=virtualization@lists.linux.dev \
--cc=xuanzhuo@linux.alibaba.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox