dev.dpdk.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v1 0/8] event/slb: introducing software load balancer eventdev PMD
@ 2026-11-07  1:30 Pravin Pathak
  2026-11-07  1:30 ` [PATCH v1 1/8] event/slb: introduce software load balancer PMD Pravin Pathak
                   ` (8 more replies)
  0 siblings, 9 replies; 14+ messages in thread
From: Pravin Pathak @ 2026-11-07  1:30 UTC (permalink / raw)
  To: dev
  Cc: jerinj, mike.ximing.chen, bruce.richardson, thomas,
	david.marchand, nipun.gupta, chenbox, tirthendu.sarkar,
	Pravin Pathak

From: Pravin Pathak <pravin.pathak.dev@gmail.com>

This series introduces the Software Load Balancer (SLB) Eventdev PMD
(`event_slb`) supporting parallel, atomic and ordered queues. It is 
a distributed software scheduler that scales well.

Motivation
----------
Existing software eventdev PMDs face trade-offs between centralized
bottlenecks and feature coverage:
- `event_sw` relies on a dedicated centralized scheduler consuming
  an extra CPU core. The single scheduling core also limits maximum
  throughput and it does not scale.
- `event_dsw` distributes scheduling across worker cores without a
  central scheduler core, but does not support ordered queues and 
  incurs per-port control ring messaging overhead during atomic flow
  migrations. It also does not support service priority.

Design Overview
---------------
`event_slb` is a distributed (`RTE_EVENT_DEV_CAP_DISTRIBUTED_SCHED`),
maintenance-free (`RTE_EVENT_DEV_CAP_MAINTENANCE_FREE`) software eventdev
PMD that supports Atomic, Ordered, Parallel, and Single-Link queues:

1. Queue-Centric Ring Architecture:
   - Parallel and Single-Link queues map directly to `rte_event_ring`
     instances (MP/MC for parallel, MP/SC for single-link), allowing
     zero-copy burst enqueue and dequeue without history tracking.
   - Ordered queues use the ring slot index at dequeue time as an implicit
     sequence number into a per-queue reorder buffer, draining contiguous
     completed events in order without global sequence counters. This 
	 makes ordered queue implementaion highly efficient performing close
	 to parallel queues.
   - Atomic queues use a main MP/SC queue ring alongside per-port SP/SC
     rings and a 2048-entry flow-to-port affinity table. All cores
	 served by the atomic queue are used for scheduling.

2. Lock-Free / Zero-Pause Atomic Flow Migration:
   - When an atomic queue refills per-port rings and detects persistent
     congestion on a destination port, SLB selects the lightest flow on
     that port (outside the migration cooldown window) and waits for
	 queues in-flight events to drain naturally before switching the 
	 flow's port affinity and schedule hold-buffer entries.
   - Hold buffer is used for buffering events towards migrating ports
     while allowing serving other ports.
   - Implementaion avoids cross-port pause/unpause control rings while
     preserving strict per-flow ordering.

3. Credit-Based Backpressure & Priority Scheduling:
   - A global atomic credit pool with per-port local credit caches bounds
     total in-flight events (`nb_events_limit`) and enforces
	 `new_event_threshold` with minimal atomic contention.
   - Ports support two strict service priority levels with
     round-robin scheduling within each priority level.

4. Observability & Testing:
   - Device and per-port/per-queue extended statistics (`xstats`),
     detailed `rte_event_dev_dump()` diagnostics, and a unit self-test
     suite (`eventdev_selftest_slb`) covering parallel, atomic, ordered,
     single-link, priority, backpressure, stop-flush, and multi-core
     atomic migration scenarios.

5. Future Plan:
   - Supporting Event priority
   - Optimizing atomic flow migration

Pravin Pathak (8):
  event/slb: introduce software load balancer PMD
  event/slb: add support for ordered queues
  event/slb: add support for atomic queues
  event/slb: add dynamic flow migration for atomic queues
  event/slb: add extended statistics and diagnostics
  event/slb: add self-test and documentation
  event/slb: update resets and credit defaults
  event/slb: improve port linking, config checks and atomic refill

 MAINTAINERS                           |    6 +
 app/test/test_eventdev.c              |    7 +
 doc/guides/eventdevs/features/slb.ini |   25 +
 doc/guides/eventdevs/index.rst        |    1 +
 doc/guides/eventdevs/slb.rst          |   61 ++
 drivers/event/meson.build             |    1 +
 drivers/event/slb/meson.build         |   21 +
 drivers/event/slb/slb_evdev.c         |  904 ++++++++++++++++++
 drivers/event/slb/slb_evdev.h         |  263 ++++++
 drivers/event/slb/slb_event.c         | 1219 +++++++++++++++++++++++++
 drivers/event/slb/slb_selftest.c      |  522 +++++++++++
 drivers/event/slb/slb_xstats.c        |  347 +++++++
 12 files changed, 3377 insertions(+)
 create mode 100644 doc/guides/eventdevs/features/slb.ini
 create mode 100644 doc/guides/eventdevs/slb.rst
 create mode 100644 drivers/event/slb/meson.build
 create mode 100644 drivers/event/slb/slb_evdev.c
 create mode 100644 drivers/event/slb/slb_evdev.h
 create mode 100644 drivers/event/slb/slb_event.c
 create mode 100644 drivers/event/slb/slb_selftest.c
 create mode 100644 drivers/event/slb/slb_xstats.c

-- 
2.53.0


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

end of thread, other threads:[~2026-11-11 14:22 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-11-07  1:30 [PATCH v1 0/8] event/slb: introducing software load balancer eventdev PMD Pravin Pathak
2026-11-07  1:30 ` [PATCH v1 1/8] event/slb: introduce software load balancer PMD Pravin Pathak
2026-11-07  1:30 ` [PATCH v1 2/8] event/slb: add support for ordered queues Pravin Pathak
2026-11-07  1:30 ` [PATCH v1 3/8] event/slb: add support for atomic queues Pravin Pathak
2026-11-07  1:30 ` [PATCH v1 4/8] event/slb: add dynamic flow migration " Pravin Pathak
2026-11-07  1:30 ` [PATCH v1 5/8] event/slb: add extended statistics and diagnostics Pravin Pathak
2026-11-07  1:30 ` [PATCH v1 6/8] event/slb: add self-test and documentation Pravin Pathak
2026-11-07  1:30 ` [PATCH v1 7/8] event/slb: update resets and credit defaults Pravin Pathak
2026-11-07  1:30 ` [PATCH v1 8/8] event/slb: improve port linking, config checks and atomic refill Pravin Pathak
2026-11-07  7:29 ` [PATCH v1 0/8] event/slb: introducing software load balancer eventdev PMD Jerin Jacob
2026-11-08 17:10   ` Stephen Hemminger
2026-11-09  2:30   ` Pravin Pathak
2026-11-09 12:55     ` Jerin Jacob
2026-11-11 14:22       ` Sarkar, Tirthendu

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