mbox series

[RFC,00/15] Add vDPA multi-threads optiomization

Message ID 20220408075606.33056-1-lizh@nvidia.com (mailing list archive)
Headers
Series Add vDPA multi-threads optiomization |

Message

Li Zhang April 8, 2022, 7:55 a.m. UTC
Allow the driver to use internal threads to
obtain fast configuration.
All the threads will be open on the same core of
the event completion queue scheduling thread.

Add max_conf_threads parameter to configure
the maximum number of internal threads in addition to
the caller thread (8 is suggested).
These internal threads to pipeline handle VDPA tasks
in system and shared with all VDPA devices.
Default is 0, don't use internal threads for configuration.

Depends-on: series=21868 ("vdpa/mlx5: improve device shutdown time")
http://patchwork.dpdk.org/project/dpdk/list/?series=21868

Li Zhang (11):
  common/mlx5: extend virtq modifiable fields
  vdpa/mlx5: pre-create virtq in the prob
  vdpa/mlx5: optimize datapath-control synchronization
  vdpa/mlx5: add multi-thread management for configuration
  vdpa/mlx5: add task ring for MT management
  vdpa/mlx5: add MT task for VM memory registration
  vdpa/mlx5: add virtq creation task for MT management
  vdpa/mlx5: add virtq LM log task
  vdpa/mlx5: add device close task
  vdpa/mlx5: add virtq sub-resources creation
  vdpa/mlx5: prepare virtqueue resource creation

Yajun Wu (4):
  examples/vdpa: fix vDPA device remove
  vdpa/mlx5: support pre create virtq resource
  common/mlx5: add DevX API to move QP to reset state
  vdpa/mlx5: support event qp reuse

 doc/guides/vdpadevs/mlx5.rst          |  25 ++
 drivers/common/mlx5/mlx5_devx_cmds.c  |  77 +++-
 drivers/common/mlx5/mlx5_devx_cmds.h  |   6 +-
 drivers/common/mlx5/mlx5_prm.h        |  30 +-
 drivers/vdpa/mlx5/meson.build         |   1 +
 drivers/vdpa/mlx5/mlx5_vdpa.c         | 227 +++++++++-
 drivers/vdpa/mlx5/mlx5_vdpa.h         | 147 ++++++-
 drivers/vdpa/mlx5/mlx5_vdpa_cthread.c | 362 ++++++++++++++++
 drivers/vdpa/mlx5/mlx5_vdpa_event.c   | 160 +++++--
 drivers/vdpa/mlx5/mlx5_vdpa_lm.c      | 133 ++++--
 drivers/vdpa/mlx5/mlx5_vdpa_mem.c     | 268 ++++++++----
 drivers/vdpa/mlx5/mlx5_vdpa_steer.c   |  20 +-
 drivers/vdpa/mlx5/mlx5_vdpa_virtq.c   | 582 ++++++++++++++++++--------
 examples/vdpa/main.c                  |   4 +
 14 files changed, 1674 insertions(+), 368 deletions(-)
 create mode 100644 drivers/vdpa/mlx5/mlx5_vdpa_cthread.c
  

Comments

Li Zhang June 6, 2022, 11:46 a.m. UTC | #1
Allow the driver to use internal threads to
obtain fast configuration.
All the threads will be open on the same core of
the event completion queue scheduling thread.

Add max_conf_threads parameter to configure
the maximum number of internal threads in addition to
the caller thread (8 is suggested).
These internal threads to pipeline handle VDPA tasks
in system and shared with all VDPA devices.
Default is 0, don't use internal threads for configuration.

Depends-on: series=21868 ("vdpa/mlx5: improve device shutdown time")
http://patchwork.dpdk.org/project/dpdk/list/?series=21868

RFC ("Add vDPA multi-threads optiomization")
https://patchwork.dpdk.org/project/dpdk/cover/20220408075606.33056-1-lizh@nvidia.com/

Li Zhang (12):
  vdpa/mlx5: fix usage of capability for max number of virtqs
  common/mlx5: extend virtq modifiable fields
  vdpa/mlx5: pre-create virtq in the prob
  vdpa/mlx5: optimize datapath-control synchronization
  vdpa/mlx5: add multi-thread management for configuration
  vdpa/mlx5: add task ring for MT management
  vdpa/mlx5: add MT task for VM memory registration
  vdpa/mlx5: add virtq creation task for MT management
  vdpa/mlx5: add virtq LM log task
  vdpa/mlx5: add device close task
  vdpa/mlx5: add virtq sub-resources creation
  vdpa/mlx5: prepare virtqueue resource creation

Yajun Wu (5):
  eal: add device removal in rte cleanup
  examples/vdpa: fix devices cleanup
  vdpa/mlx5: support pre create virtq resource
  common/mlx5: add DevX API to move QP to reset state
  vdpa/mlx5: support event qp reuse

 doc/guides/vdpadevs/mlx5.rst          |  25 +
 drivers/common/mlx5/mlx5_devx_cmds.c  |  77 ++-
 drivers/common/mlx5/mlx5_devx_cmds.h  |   6 +-
 drivers/common/mlx5/mlx5_prm.h        |  30 +-
 drivers/vdpa/mlx5/meson.build         |   1 +
 drivers/vdpa/mlx5/mlx5_vdpa.c         | 270 +++++++++--
 drivers/vdpa/mlx5/mlx5_vdpa.h         | 152 +++++-
 drivers/vdpa/mlx5/mlx5_vdpa_cthread.c | 360 ++++++++++++++
 drivers/vdpa/mlx5/mlx5_vdpa_event.c   | 160 +++++--
 drivers/vdpa/mlx5/mlx5_vdpa_lm.c      | 128 ++++-
 drivers/vdpa/mlx5/mlx5_vdpa_mem.c     | 270 +++++++----
 drivers/vdpa/mlx5/mlx5_vdpa_steer.c   |  22 +-
 drivers/vdpa/mlx5/mlx5_vdpa_virtq.c   | 654 +++++++++++++++++++-------
 examples/vdpa/main.c                  |   5 +-
 lib/eal/freebsd/eal.c                 |  33 ++
 lib/eal/include/rte_dev.h             |   6 +
 lib/eal/linux/eal.c                   |  33 ++
 lib/eal/windows/eal.c                 |  33 ++
 18 files changed, 1878 insertions(+), 387 deletions(-)
 create mode 100644 drivers/vdpa/mlx5/mlx5_vdpa_cthread.c