All of lore.kernel.org
 help / color / mirror / Atom feed
From: Pravin Pathak <pravinpathakdev@gmail.com>
To: dev@dpdk.org
Cc: jerinj@marvell.com, mike.ximing.chen@intel.com,
	bruce.richardson@intel.com, thomas@monjalon.net,
	david.marchand@redhat.com, nipun.gupta@amd.com,
	chenbox@nvidia.com, tirthendu.sarkar@intel.com,
	Pravin Pathak <pravin.pathak.dev@gmail.com>
Subject: [PATCH v1 0/8] event/slb: introducing software load balancer eventdev PMD
Date: Fri,  6 Nov 2026 20:30:02 -0500	[thread overview]
Message-ID: <20261107013011.2443138-1-pravinpathakdev@gmail.com> (raw)

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


             reply	other threads:[~2026-11-07  1:30 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-07  1:30 Pravin Pathak [this message]
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

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=20261107013011.2443138-1-pravinpathakdev@gmail.com \
    --to=pravinpathakdev@gmail.com \
    --cc=bruce.richardson@intel.com \
    --cc=chenbox@nvidia.com \
    --cc=david.marchand@redhat.com \
    --cc=dev@dpdk.org \
    --cc=jerinj@marvell.com \
    --cc=mike.ximing.chen@intel.com \
    --cc=nipun.gupta@amd.com \
    --cc=pravin.pathak.dev@gmail.com \
    --cc=thomas@monjalon.net \
    --cc=tirthendu.sarkar@intel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.