]> git.baikalelectronics.ru Git - kernel.git/commit
io_uring: register single issuer task at creation
authorDylan Yudaken <dylany@fb.com>
Mon, 26 Sep 2022 17:09:25 +0000 (10:09 -0700)
committerJens Axboe <axboe@kernel.dk>
Mon, 26 Sep 2022 17:26:18 +0000 (11:26 -0600)
commit52ceeb57b07b194d530018f47b9b221c2e7d1afc
tree9d9168b5820b727353aade8cdc9479eaefe9a344
parentb0b48f7e2120757e23697dad95f1ccd675f7f01b
io_uring: register single issuer task at creation

Instead of picking the task from the first submitter task, rather use the
creator task or in the case of disabled (IORING_SETUP_R_DISABLED) the
enabling task.

This approach allows a lot of simplification of the logic here. This
removes init logic from the submission path, which can always be a bit
confusing, but also removes the need for locking to write (or read) the
submitter_task.

Users that want to move a ring before submitting can create the ring
disabled and then enable it on the submitting task.

Signed-off-by: Dylan Yudaken <dylany@fb.com>
Fixes: 4b224a2e14f5 ("io_uring: add IORING_SETUP_SINGLE_ISSUER")
Signed-off-by: Jens Axboe <axboe@kernel.dk>
io_uring/io_uring.c