Skip to content

io_uring restrictions cleanups and improvements

Jens Axboe io-uring 1 version Applied

Status from this message: Applied, thanks!

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest5 patches 3 repliesApplied

Patches in v1 Applied

#Subject and filesSizeRepliesApplied
1/5io_uring/register: have io_parse_restrictions() return number of opsio_uring/register.c+10 -70 replies
2/5io_uring/register: have io_parse_restrictions() set restrictions enabledio_uring/register.c+1 -10 replies
3/5io_uring/register: set ctx->restricted when restrictions are parsedio_uring/register.c+3 -40 replies
4/5io_uring: move ctx->restricted check into io_check_restriction()io_uring/io_uring.c+3 -10 replies
5/5io_uring: track restrictions separately for IORING_OP and IORING_REGISTERinclude/linux/io_uring_types.h io_uring/io_uring.c io_uring/register.c+22 -90 replies

Reviews trailers per patch

None of the 5 patches has a Reviewed-by or Acked-by of their own; the series has one for all of them.

PatchGabriel Krisman Bertazi
SeriesR-b
1/5
2/5
3/5
4/5
5/5

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

Read the v1 thread

Cover letter [PATCHSET 0/5] io_uring restrictions cleanups and improvements

Hi,

In doing the task based restriction sets, I found myself doing a few cleanups and improvements along the way. These really had nothing to do with the added feature, hence I'm splitting them out into a separate patchset.

This series is really 4 patches doing cleanup and preparation for making it easier to add the task based restrictions, and patch 5 is an improvement for how restrictions are checked. I ran some overhead numbers and it's honestly surprisingly low for microbenchmarks. For example, running a pure NOP workload at 13-15M op/sec, checking restrictions is only about 1.5% of the CPU time. Never the less, I suspect the most common restrictions applied is to limit the register operations that can be done. Hence it makes sense to track whether we have IORING_OP* or IORING_REGISTER* restrictions separately, so it can be avoided to check ones op based restrictions if only register based ones have been set.

 include/linux/io_uring_types.h |  8 ++++++--
 io_uring/io_uring.c            |  6 ++++--
 io_uring/register.c            | 35 ++++++++++++++++++++++------------
 3 files changed, 33 insertions(+), 16 deletions(-)
Signature · 1 line
Jens Axboe