public inbox for passt-dev@passt.top
 help / color / mirror / code / Atom feed
* [PATCH 0/7] multithreading: Add worker threads for queue pair processing
@ 2026-07-31 16:46 Laurent Vivier
  2026-07-31 16:46 ` [PATCH 1/7] vhost_user: Reset vq enable flag in vu_cleanup() Laurent Vivier
                   ` (6 more replies)
  0 siblings, 7 replies; 8+ messages in thread
From: Laurent Vivier @ 2026-07-31 16:46 UTC (permalink / raw)
  To: passt-dev; +Cc: Laurent Vivier

NOTE: This series has known stability issues (hangs and crashes under load)
and is submitted for reference and testing purposes.

This series adds pthread-based worker threads to enable parallel processing
of queue pairs in vhost-user mode. Each queue pair gets its own worker thread
with a dedicated epollfd.

Thread 0 handles control events (listen sockets, vhost-user commands, repair,
netlink) plus queue pair 0. Threads 1-15 handle only their assigned queue pair
events. Threads start/stop dynamically via SET_VRING_ENABLE.

Known issues include system hangs under load and crashes when virtqueues are
exhausted. A temporary workaround in virtio.c masks underlying coordination
problems between worker threads that need proper fixes.

Based-on: 20260731162329.3552800-1-lvivier@redhat.com

Laurent Vivier (7):
  vhost_user: Reset vq enable flag in vu_cleanup()
  threading: Add basic threading infrastructure
  passt: Integrate main event loop with threading infrastructure
  flow: Delegate epoll file descriptor management to threading subsystem
  ctx: Remove epollfd from context structure
  vhost-user: Add per-qpair worker threads
  virtio: Prevent crash on virtqueue exhaustion with temporary
    workaround

 Makefile     |   8 +-
 conf.c       |  10 ++-
 flow.c       |  12 +--
 flow.h       |   4 +-
 fwd.c        |   4 +-
 isolation.c  |   6 +-
 netlink.c    |   4 +-
 passt.c      | 151 ++++++++++++++++++++++++--------------
 passt.h      |   7 +-
 pasta.c      |   3 +-
 pif.c        |   3 +-
 repair.c     |  12 ++-
 tap.c        |   9 ++-
 tcp.c        |   3 +-
 tcp_splice.c |   1 +
 threading.c  | 202 +++++++++++++++++++++++++++++++++++++++++++++++++++
 threading.h  |  22 ++++++
 vhost_user.c |  34 +++++++--
 vhost_user.h |   1 +
 virtio.c     |   8 +-
 vu_common.c  |  13 ++--
 21 files changed, 417 insertions(+), 100 deletions(-)
 create mode 100644 threading.c
 create mode 100644 threading.h

-- 
2.54.0


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

end of thread, other threads:[~2026-07-31 16:46 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-07-31 16:46 [PATCH 0/7] multithreading: Add worker threads for queue pair processing Laurent Vivier
2026-07-31 16:46 ` [PATCH 1/7] vhost_user: Reset vq enable flag in vu_cleanup() Laurent Vivier
2026-07-31 16:46 ` [PATCH 2/7] threading: Add basic threading infrastructure Laurent Vivier
2026-07-31 16:46 ` [PATCH 3/7] passt: Integrate main event loop with " Laurent Vivier
2026-07-31 16:46 ` [PATCH 4/7] flow: Delegate epoll file descriptor management to threading subsystem Laurent Vivier
2026-07-31 16:46 ` [PATCH 5/7] ctx: Remove epollfd from context structure Laurent Vivier
2026-07-31 16:46 ` [PATCH 6/7] vhost-user: Add per-qpair worker threads Laurent Vivier
2026-07-31 16:46 ` [PATCH 7/7] virtio: Prevent crash on virtqueue exhaustion with temporary workaround Laurent Vivier

Code repositories for project(s) associated with this public inbox

	https://passt.top/passt

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 IMAP folder(s).