Skip to content

implement io_uring notification (ubuf_info) stacking

Pavel Begunkov io-uring kvm netdev virtualization xen-devel 2 versions – Applied

Status from this message: Applied, thanks!

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest4 patches 4 repliesApplied 2/4
  2. v1 RFC6 patches 18 repliesSuperseded

Patches in v2 Applied · 2/4

#Subject and filesSizeRepliesApplied
1/4net: extend ubuf_info callback to ops structuredrivers/net/tap.c drivers/net/tun.c drivers/net/xen-netback/common.h +6 more+46 -271 replyApplied
2/4net: add callback for setting a ubuf_info to skbinclude/linux/skbuff.h net/core/skbuff.c+16 -61 replyApplied
3/4io_uring/notif: simplify io_notif_flush()io_uring/notif.c io_uring/notif.h+6 -90 replies
4/4io_uring/notif: implement notification stackingio_uring/notif.c io_uring/notif.h+67 -70 replies

Reviews trailers per patch

All 4 patches have a Reviewed-by or Acked-by.

PatchJens AxboeDavid AhernWillem de Bruijn
1/4R-b R-b R-b
2/4R-b R-b R-b
3/4R-b
4/4R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 3 reviewers.

Read the v2 thread

Cover letter [PATCH io_uring-next/net-next v2 0/4] implement io_uring notification (ubuf_info) stacking

Please, don't take directly, conflicts with io_uring.

To have per request buffer notifications each zerocopy io_uring send request allocates a new ubuf_info. However, as an skb can carry only one uarg, it may force the stack to create many small skbs hurting performance in many ways.

The patchset implements notification, i.e. an io_uring's ubuf_info extension, stacking. It attempts to link ubuf_info's into a list, allowing to have multiple of them per skb.

liburing/examples/send-zerocopy shows up 6 times performance improvement for TCP with 4KB bytes per send, and levels it with MSG_ZEROCOPY. Without the patchset it requires much larger sends to utilise all potential.

bytes  | before | after (Kqps)
1200   | 195    | 1023
4000   | 193    | 1386
8000   | 154    | 1058

The patches are on top of net-next + io_uring-next:

https://github.com/isilence/linux.git iou-sendzc/notif-stacking-v2

First two patches based on net-next:

https://github.com/isilence/linux.git iou-sendzc/notif-stacking-v2-netonly

v2: convert xen-netback to ubuf_info_ops (patch 1)
drop two separately merged io_uring patches

Pavel Begunkov (4):
net: extend ubuf_info callback to ops structure
net: add callback for setting a ubuf_info to skb io_uring/notif: simplify io_notif_flush() io_uring/notif: implement notification stacking

 drivers/net/tap.c                   |  2 +-
 drivers/net/tun.c                   |  2 +-
 drivers/net/xen-netback/common.h    |  5 +-
 drivers/net/xen-netback/interface.c |  2 +-
 drivers/net/xen-netback/netback.c   | 11 ++--
 drivers/vhost/net.c                 |  8 ++-
 include/linux/skbuff.h              | 21 +++++---
 io_uring/notif.c                    | 83 +++++++++++++++++++++++++----
 io_uring/notif.h                    | 12 ++---
 net/core/skbuff.c                   | 36 ++++++++-----
 10 files changed, 134 insertions(+), 48 deletions(-)
Signature · 1 line
2.44.0