1. 04 6月, 2020 2 次提交
    • J
      io_uring: use poll driven retry for files that support it · 73411260
      Jens Axboe 提交于
      to #28170604
      
      commit d7718a9d25a61442da8ee8aeeff6a0097f0ccfd6 upstream
      
      Currently io_uring tries any request in a non-blocking manner, if it can,
      and then retries from a worker thread if we get -EAGAIN. Now that we have
      a new and fancy poll based retry backend, use that to retry requests if
      the file supports it.
      
      This means that, for example, an IORING_OP_RECVMSG on a socket no longer
      requires an async thread to complete the IO. If we get -EAGAIN reading
      from the socket in a non-blocking manner, we arm a poll handler for
      notification on when the socket becomes readable. When it does, the
      pending read is executed directly by the task again, through the io_uring
      task work handlers. Not only is this faster and more efficient, it also
      means we're not generating potentially tons of async threads that just
      sit and block, waiting for the IO to complete.
      
      The feature is marked with IORING_FEAT_FAST_POLL, meaning that async
      pollable IO is fast, and that poll<link>other_op is fast as well.
      Signed-off-by: NJens Axboe <axboe@kernel.dk>
      Acked-by: NJoseph Qi <joseph.qi@linux.alibaba.com>
      Signed-off-by: NXiaoguang Wang <xiaoguang.wang@linux.alibaba.com>
      73411260
    • P
      io_uring: add splice(2) support · a3e58e00
      Pavel Begunkov 提交于
      to #28170604
      
      commit 7d67af2c013402537385dae343a2d0f6a4cb3bfd upstream
      
      Add support for splice(2).
      
      - output file is specified as sqe->fd, so it's handled by generic code
      - hash_reg_file handled by generic code as well
      - len is 32bit, but should be fine
      - the fd_in is registered file, when SPLICE_F_FD_IN_FIXED is set, which
      is a splice flag (i.e. sqe->splice_flags).
      Signed-off-by: NPavel Begunkov <asml.silence@gmail.com>
      Signed-off-by: NJens Axboe <axboe@kernel.dk>
      Acked-by: NJoseph Qi <joseph.qi@linux.alibaba.com>
      Signed-off-by: NXiaoguang Wang <xiaoguang.wang@linux.alibaba.com>
      a3e58e00
  2. 28 5月, 2020 21 次提交
  3. 27 5月, 2020 5 次提交
  4. 18 3月, 2020 12 次提交