1. 16 Mar, 2021 1 commit
    • Lars-Peter Clausen's avatar
      dmaengine: xilinx: Introduce synchronize() callback · 50db2050
      Lars-Peter Clausen authored
      The Xilinx dmaengine driver uses a tasklet to process completed
      descriptors and execute their callbacks.
      
      Currently consumers of the DMA channel have to no method of synchronization
      against this tasklet when using the Xilinx dmaengine drivers. This can lead
      to race conditions when the consumer frees resources that are accessed in
      the callback before the tasklet has finished running.
      
      It is not enough to just call dmaengine_terminal_all() since on a
      multi-processor system the tasklet can run concurrently to it and might
      call the callback after dmaengine_terminate_all() has already finished.
      
      To mitigate this issue implement the synchronize() callback for the driver,
      which will wait until the tasklet has finished.
      Signed-off-by: default avatarLars-Peter Clausen <lars@metafoo.de>
      Link: https://lore.kernel.org/r/20210313125311.4823-1-lars@metafoo.deSigned-off-by: default avatarVinod Koul <vkoul@kernel.org>
      50db2050
  2. 06 Mar, 2021 4 commits
  3. 05 Mar, 2021 33 commits
  4. 04 Mar, 2021 2 commits
    • Jens Axboe's avatar
      kernel: provide create_io_thread() helper · cc440e87
      Jens Axboe authored
      Provide a generic helper for setting up an io_uring worker. Returns a
      task_struct so that the caller can do whatever setup is needed, then call
      wake_up_new_task() to kick it into gear.
      
      Add a kernel_clone_args member, io_thread, which tells copy_process() to
      mark the task with PF_IO_WORKER.
      Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
      cc440e87
    • Pavel Begunkov's avatar
      io_uring: reliably cancel linked timeouts · dd59a3d5
      Pavel Begunkov authored
      Linked timeouts are fired asynchronously (i.e. soft-irq), and use
      generic cancellation paths to do its stuff, including poking into io-wq.
      The problem is that it's racy to access tctx->io_wq, as
      io_uring_task_cancel() and others may be happening at this exact moment.
      Mark linked timeouts with REQ_F_INLIFGHT for now, making sure there are
      no timeouts before io-wq destraction.
      Signed-off-by: default avatarPavel Begunkov <asml.silence@gmail.com>
      Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
      dd59a3d5