Skip to content
Snippets Groups Projects
  1. Feb 06, 2023
  2. Jan 29, 2023
  3. Jan 04, 2023
  4. Dec 17, 2022
  5. Dec 14, 2022
  6. Dec 07, 2022
    • Pavel Begunkov's avatar
      io_uring: skip spinlocking for ->task_complete · f66f7342
      Pavel Begunkov authored
      
      ->task_complete was added to serialised CQE posting by doing it from
      the task context only (or fallback wq when the task is dead), and now we
      can use that to avoid taking ->completion_lock while filling CQ entries.
      The patch skips spinlocking only in two spots,
      __io_submit_flush_completions() and flushing in io_aux_cqe, it's safer
      and covers all cases we care about. Extra care is taken to force taking
      the lock while queueing overflow entries.
      
      It fundamentally relies on SINGLE_ISSUER to have only one task posting
      events. It also need to take into account overflowed CQEs, flushing of
      which happens in the cq wait path, and so this implementation also needs
      DEFER_TASKRUN to limit waiters. For the same reason we disable it for
      SQPOLL, and for IOPOLL as it won't benefit from it in any case.
      DEFER_TASKRUN, SQPOLL and IOPOLL requirement may be relaxed in the
      future.
      
      Signed-off-by: default avatarPavel Begunkov <asml.silence@gmail.com>
      Link: https://lore.kernel.org/r/2a8c91fd82cfcdcc1d2e5bac7051fe2c183bda73.1670384893.git.asml.silence@gmail.com
      
      
      [axboe: modify to apply]
      Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
      f66f7342
  7. Nov 30, 2022
  8. Nov 25, 2022
  9. Nov 23, 2022
  10. Nov 22, 2022
    • Jens Axboe's avatar
      io_uring: pass in EPOLL_URING_WAKE for eventfd signaling and wakeups · 44648532
      Jens Axboe authored
      
      Pass in EPOLL_URING_WAKE when signaling eventfd or doing poll related
      wakups, so that we can check for a circular event dependency between
      eventfd and epoll. If this flag is set when our wakeup handlers are
      called, then we know we have a dependency that needs to terminate
      multishot requests.
      
      eventfd and epoll are the only such possible dependencies.
      
      Cc: stable@vger.kernel.org # 6.0
      Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
      44648532
  11. Nov 21, 2022
  12. Nov 17, 2022
  13. Oct 27, 2022
  14. Oct 13, 2022
  15. Sep 30, 2022
    • Jens Axboe's avatar
      io_uring: don't gate task_work run on TIF_NOTIFY_SIGNAL · 46a525e1
      Jens Axboe authored
      
      This isn't a reliable mechanism to tell if we have task_work pending, we
      really should be looking at whether we have any items queued. This is
      problematic if forward progress is gated on running said task_work. One
      such example is reading from a pipe, where the write side has been closed
      right before the read is started. The fput() of the file queues TWA_RESUME
      task_work, and we need that task_work to be run before ->release() is
      called for the pipe. If ->release() isn't called, then the read will sit
      forever waiting on data that will never arise.
      
      Fix this by io_run_task_work() so it checks if we have task_work pending
      rather than rely on TIF_NOTIFY_SIGNAL for that. The latter obviously
      doesn't work for task_work that is queued without TWA_SIGNAL.
      
      Reported-by: default avatarChristiano Haesbaert <haesbaert@haesbaert.org>
      Cc: stable@vger.kernel.org
      Link: https://github.com/axboe/liburing/issues/665
      
      
      Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
      46a525e1
  16. Sep 23, 2022
  17. Sep 21, 2022
  18. Jul 27, 2022
Loading