[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20221121191437.996297-1-shr@devkernel.io>
Date: Mon, 21 Nov 2022 11:14:34 -0800
From: Stefan Roesch <shr@...kernel.io>
To: kernel-team@...com
Cc: shr@...kernel.io, axboe@...nel.dk, olivier@...llion01.com,
netdev@...r.kernel.org, io-uring@...r.kernel.org, kuba@...nel.org
Subject: [PATCH v5 0/3] io_uring: add napi busy polling support
This adds the napi busy polling support in io_uring.c. It adds a new
napi_list to the io_ring_ctx structure. This list contains the list of
napi_id's that are currently enabled for busy polling. This list is
used to determine which napi id's enabled busy polling.
io-uring allows specifying two parameters:
- busy poll timeout and
- prefer busy poll to call of io_napi_busy_loop()
This sets the above parameters for the ring. The settings are passed
with a new structure io_uring_napi.
There is also a corresponding liburing patch series, which enables this
feature. The name of the series is "liburing: add add api for napi busy
poll timeout". It also contains two programs to test the this.
Testing has shown that the round-trip times are reduced to 38us from
55us by enabling napi busy polling with a busy poll timeout of 100us.
More detailled results are part of the commit message of the first
patch.
Changes:
- V5:
- Refreshed to 6.1-rc6
- Use copy_from_user instead of memdup/kfree
- Removed the moving of napi_busy_poll_to
- Return -EINVAL if any of the reserved or padded fields are not 0.
- V4:
- Pass structure for napi config, instead of individual parameters
- V3:
- Refreshed to 6.1-rc5
- Added a new io-uring api for the prefer napi busy poll api and wire
it to io_napi_busy_loop().
- Removed the unregister (implemented as register)
- Added more performance results to the first commit message.
- V2:
- Add missing defines if CONFIG_NET_RX_BUSY_POLL is not defined
- Changes signature of function io_napi_add_list to static inline
if CONFIG_NET_RX_BUSY_POLL is not defined
- define some functions as static
Signed-off-by: Stefan Roesch <shr@...kernel.io>
Acked-by: Jakub Kicinski <kuba@...nel.org>
Stefan Roesch (3):
io_uring: add napi busy polling support
io_uring: add api to set / get napi configuration.
io_uring: add api to set napi prefer busy poll
include/linux/io_uring_types.h | 8 +
include/uapi/linux/io_uring.h | 12 ++
io_uring/io_uring.c | 302 +++++++++++++++++++++++++++++++++
io_uring/napi.h | 22 +++
io_uring/poll.c | 3 +
io_uring/sqpoll.c | 10 ++
6 files changed, 357 insertions(+)
create mode 100644 io_uring/napi.h
base-commit: eb7081409f94a9a8608593d0fb63a1aa3d6f95d8
--
2.30.2
Powered by blists - more mailing lists