Skip to content

liburing: add api for napi busy poll

Stefan Roesch io-uring 10 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v9 Latest4 patches 10 repliesIn review
  2. v84 patches 0 repliesSuperseded
  3. v74 patches 4 repliesSuperseded
Earlier versions · 7
VersionPostedPatchesRepliesStatus
v64 patches5 repliesSuperseded
v54 patches2 repliesSuperseded
v4 RFC posting 2/24 patches8 repliesSuperseded
v4 RFC posting 1/24 patches0 repliesSuperseded
v3 RFC4 patches0 repliesSuperseded
v2 RFC4 patches4 repliesSuperseded
v1 RFC3 patches8 repliesSuperseded

Changes from the cover letter · 32 lines

- V9:
- Update to library V2.4 and kernel 6.4
- V8:
- Use tab in liburing-ffi.map file
- Small fix to io_uring_register_napi man page
- V7:
- Add new functions to liburing-ffi.map file.
- Fix some whitespace issues.
- Address the compile errors from CI in the two files napi-busy-poll-client.c and napi-busy-poll-server.c
- V6:
- Check return value of unregister napi call and verify that busy poll timeout and prefer busy poll return the expected values.
- V5:
- Fixes to documentation.
- Correct opcode for unregister call
- Initialize napi structure in example programs
- Address tab issues in recordRTT()
- V4:
- Modify functions to use a structure to pass the napi busy poll settings to the kernel.
- Return previous values when returning from the above functions.
- Rename the functions and remove one function (no longer needed as the data is passed as a structure)
- V3:
- Updated liburing.map file
- Moved example programs from the test directory to the example directory. The two example programs don't fit well in the test category and need to be run from separate hosts.
- Added the io_uring_register_napi_prefer_busy_poll API.
- Added the call to io_uring_register_napi_prefer_busy_poll to the example programs
- Updated the documentation
- V2:
- Updated the liburing.map file for the two new functions. (added a 2.4 section)
- Added a description of the new feature to the changelog file
- Fixed the indentation of the longopts structure
- Used defined exit constants
- Fixed encodeUserData to support 32 bit builds

Patches in v9 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/4liburing: add api to set napi busy poll settingssrc/include/liburing.h src/include/liburing/io_uring.h src/liburing-ffi.map +2 more+31 -010 replies
2/4liburing: add documentation for new napi busy pollingman/io_uring_register_napi.3 man/io_uring_unregister_napi.3+67 -00 replies
3/4liburing: add example programs for napi busy poll.gitignore examples/Makefile examples/napi-busy-poll-client.c +1 more+841 -00 replies
4/4liburing: update changelog with new featureCHANGELOG+1 -00 replies

Reviews trailers per patch

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

PatchAmmar Faizi
1/4R-b
2/4R-b
3/4A-b
4/4A-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v9 thread

Cover letter [PATCH v9 0/4] liburing: add api for napi busy poll

This adds two new api's to set/clear the napi busy poll settings. The two new functions are called:
- io_uring_register_napi
- io_uring_unregister_napi

The patch series also contains the documentation for the two new functions and two example programs. The client program is called napi-busy-poll-client and the server program napi-busy-poll-server. The client measures the roundtrip times of requests.

There is also a kernel patch "io-uring: support napi busy poll" to enable this feature on the kernel side.

Changes:
- V9:
- Update to library V2.4 and kernel 6.4
- V8:
- Use tab in liburing-ffi.map file
- Small fix to io_uring_register_napi man page
- V7:
- Add new functions to liburing-ffi.map file.
- Fix some whitespace issues.
- Address the compile errors from CI in the two files napi-busy-poll-client.c and napi-busy-poll-server.c
- V6:
- Check return value of unregister napi call and verify that busy poll timeout and prefer busy poll return the expected values.
- V5:
- Fixes to documentation.
- Correct opcode for unregister call
- Initialize napi structure in example programs
- Address tab issues in recordRTT()
- V4:
- Modify functions to use a structure to pass the napi busy poll settings to the kernel.
- Return previous values when returning from the above functions.
- Rename the functions and remove one function (no longer needed as the data is passed as a structure)
- V3:
- Updated liburing.map file
- Moved example programs from the test directory to the example directory. The two example programs don't fit well in the test category and need to be run from separate hosts.
- Added the io_uring_register_napi_prefer_busy_poll API.
- Added the call to io_uring_register_napi_prefer_busy_poll to the example programs
- Updated the documentation
- V2:
- Updated the liburing.map file for the two new functions. (added a 2.4 section)
- Added a description of the new feature to the changelog file
- Fixed the indentation of the longopts structure
- Used defined exit constants
- Fixed encodeUserData to support 32 bit builds

*** BLURB HERE ***

Stefan Roesch (4):
liburing: add api to set napi busy poll settings
liburing: add documentation for new napi busy polling
liburing: add example programs for napi busy poll
liburing: update changelog with new feature

 .gitignore                       |   2 +
 CHANGELOG                        |   1 +
 examples/Makefile                |   2 +
 examples/napi-busy-poll-client.c | 451 +++++++++++++++++++++++++++++++
 examples/napi-busy-poll-server.c | 386 ++++++++++++++++++++++++++
 man/io_uring_register_napi.3     |  40 +++
 man/io_uring_unregister_napi.3   |  27 ++
 src/include/liburing.h           |   3 +
 src/include/liburing/io_uring.h  |  12 +
 src/liburing-ffi.map             |   2 +
 src/liburing.map                 |   2 +
 src/register.c                   |  12 +
 12 files changed, 940 insertions(+)
 create mode 100644 examples/napi-busy-poll-client.c
 create mode 100644 examples/napi-busy-poll-server.c
 create mode 100644 man/io_uring_register_napi.3
 create mode 100644 man/io_uring_unregister_napi.3

base-commit: b7f85996a5cb290fc2ad7d2f4d7341fc54321016

Signature · 1 line
2.39.1