History

io_uring/io-wq: don't use static creds/mm assignments

We currently setup the io_wq with a static set of mm and creds. Even for a single-use io-wq per io_uring, this is suboptimal as we have may have multiple enters of the ring. For sharing the io-wq backend, it doesn't work at all. Switch to passing in the creds and mm when the work item is setup. This means that async work is no longer deferred to the io_uring mm and creds, it is done with the current mm and creds. Flag this behavior with IORING_FEAT_CUR_PERSONALITY, so applications know they can rely on the current personality (mm and creds) being the same for direct issue and async issue.

Jens Axboe committed 6 years ago

Commit cccf0ee1 parent 848f7e14 files · +82 −30Browse files

Showing the changes to include/uapi/linux (1 of 4 files). Show all

Unified · Split

include/uapi/linux/io_uring.h+1−0
@@ -195,6 +195,7 @@ struct io_uring_params { · 194 unmodified lines
195#define IORING_FEAT_NODROP (1U << 1)195#define IORING_FEAT_NODROP (1U << 1)
196#define IORING_FEAT_SUBMIT_STABLE (1U << 2)196#define IORING_FEAT_SUBMIT_STABLE (1U << 2)
197#define IORING_FEAT_RW_CUR_POS (1U << 3)197#define IORING_FEAT_RW_CUR_POS (1U << 3)
198#define IORING_FEAT_CUR_PERSONALITY (1U << 4)
198 199
199/*200/*
200 * io_uring_register(2) opcodes and arguments201 * io_uring_register(2) opcodes and arguments