Re: [PATCH 5.10] io_uring: don't forget to task-cancel drained reqs

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 11/5/20 7:06 AM, Pavel Begunkov wrote:
> If there is a long-standing request of one task locking up execution of
> deferred requests, and the defer list contains requests of another task
> (all files-less), then a potential execution of __io_uring_task_cancel()
> by that another task will sleep until that first long-standing request
> completion, and that may take long.
> 
> E.g.
> tsk1: req1/read(empty_pipe) -> tsk2: req(DRAIN)
> Then __io_uring_task_cancel(tsk2) waits for req1 completion.
> 
> It seems we even can manufacture a complicated case with many tasks
> sharing many rings that can lock them forever.
> 
> Cancel deferred requests for __io_uring_task_cancel() as well.

Thanks, applied.

-- 
Jens Axboe




[Index of Archives]     [Linux Samsung SoC]     [Linux Rockchip SoC]     [Linux Actions SoC]     [Linux for Synopsys ARC Processors]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]


  Powered by Linux