Merge tag 'for-6.5/io_uring-2023-06-23' of git://git.kernel.dk/linux
authorLinus Torvalds <torvalds@linux-foundation.org>
Mon, 26 Jun 2023 19:30:26 +0000 (12:30 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Mon, 26 Jun 2023 19:30:26 +0000 (12:30 -0700)
Pull io_uring updates from Jens Axboe:
 "Nothing major in this release, just a bunch of cleanups and some
  optimizations around networking mostly.

   - clean up file request flags handling (Christoph)

   - clean up request freeing and CQ locking (Pavel)

   - support for using pre-registering the io_uring fd at setup time
     (Josh)

   - Add support for user allocated ring memory, rather than having the
     kernel allocate it. Mostly for packing rings into a huge page (me)

   - avoid an unnecessary double retry on receive (me)

   - maintain ordering for task_work, which also improves performance
     (me)

   - misc cleanups/fixes (Pavel, me)"

* tag 'for-6.5/io_uring-2023-06-23' of git://git.kernel.dk/linux: (39 commits)
  io_uring: merge conditional unlock flush helpers
  io_uring: make io_cq_unlock_post static
  io_uring: inline __io_cq_unlock
  io_uring: fix acquire/release annotations
  io_uring: kill io_cq_unlock()
  io_uring: remove IOU_F_TWQ_FORCE_NORMAL
  io_uring: don't batch task put on reqs free
  io_uring: move io_clean_op()
  io_uring: inline io_dismantle_req()
  io_uring: remove io_free_req_tw
  io_uring: open code io_put_req_find_next
  io_uring: add helpers to decode the fixed file file_ptr
  io_uring: use io_file_from_index in io_msg_grab_file
  io_uring: use io_file_from_index in __io_sync_cancel
  io_uring: return REQ_F_ flags from io_file_get_flags
  io_uring: remove io_req_ffs_set
  io_uring: remove a confusing comment above io_file_get_flags
  io_uring: remove the mode variable in io_file_get_flags
  io_uring: remove __io_file_supports_nowait
  io_uring: wait interruptibly for request completions on exit
  ...

1  2 
block/fops.c
drivers/nvme/host/ioctl.c
io_uring/net.c
io_uring/poll.c
net/socket.c

diff --cc block/fops.c
Simple merge
Simple merge
diff --cc io_uring/net.c
@@@ -789,19 -794,17 +802,20 @@@ retry_multishot
        flags = sr->msg_flags;
        if (force_nonblock)
                flags |= MSG_DONTWAIT;
 -      if (flags & MSG_WAITALL)
 -              min_ret = iov_iter_count(&kmsg->msg.msg_iter);
  
        kmsg->msg.msg_get_inq = 1;
 -      if (req->flags & REQ_F_APOLL_MULTISHOT)
+       kmsg->msg.msg_inq = -1U;
 +      if (req->flags & REQ_F_APOLL_MULTISHOT) {
                ret = io_recvmsg_multishot(sock, sr, kmsg, flags,
                                           &mshot_finished);
 -      else
 +      } else {
 +              /* disable partial retry for recvmsg with cmsg attached */
 +              if (flags & MSG_WAITALL && !kmsg->msg.msg_controllen)
 +                      min_ret = iov_iter_count(&kmsg->msg.msg_iter);
 +
                ret = __sys_recvmsg_sock(sock, &kmsg->msg, sr->umsg,
                                         kmsg->uaddr, flags);
 +      }
  
        if (ret < min_ret) {
                if (ret == -EAGAIN && force_nonblock) {
diff --cc io_uring/poll.c
Simple merge
diff --cc net/socket.c
Simple merge