The restriction of needing fixed files for SQPOLL is problematic, and prevents/inhibits several valid uses cases. With the referenced files_struct that we have now, it's trivially supportable. Treat ->files like we do the mm for the SQPOLL thread - grab a reference to it (and assign it), and drop it when we're done. This feature is exposed as IORING_FEAT_SQPOLL_NONFIXED.
Showing the changes to include/uapi/linux (1 of 2 files). Show all
Unified · Split
| @@ -254,6 +254,7 @@ struct io_uring_params { · 253 unmodified lines | |||
| 254 | #define IORING_FEAT_CUR_PERSONALITY (1U << 4) | 254 | #define IORING_FEAT_CUR_PERSONALITY (1U << 4) |
| 255 | #define IORING_FEAT_FAST_POLL (1U << 5) | 255 | #define IORING_FEAT_FAST_POLL (1U << 5) |
| 256 | #define IORING_FEAT_POLL_32BITS (1U << 6) | 256 | #define IORING_FEAT_POLL_32BITS (1U << 6) |
| 257 | #define IORING_FEAT_SQPOLL_NONFIXED (1U << 7) | ||
| 257 | 258 | ||
| 258 | /* | 259 | /* |
| 259 | * io_uring_register(2) opcodes and arguments | 260 | * io_uring_register(2) opcodes and arguments |