public inbox for io-uring@vger.kernel.org
 help / color / mirror / Atom feed
From: Pavel Begunkov <asml.silence@gmail.com>
To: Joseph Qi <jiangqi903@gmail.com>, Jens Axboe <axboe@kernel.dk>,
	io-uring@vger.kernel.org
Subject: Re: [PATCH 0/3] files cancellation cleanup
Date: Mon, 25 Jan 2021 10:48:58 +0000	[thread overview]
Message-ID: <09aec3c5-bf2a-92cd-4388-2403ba9f4bd3@gmail.com> (raw)
In-Reply-To: <4ddd9aa4-bbdd-9730-f1b9-7a26ccaaf842@gmail.com>

On 25/01/2021 02:14, Joseph Qi wrote:
> On 1/23/21 5:49 AM, Pavel Begunkov wrote:
>> On 22/01/2021 09:45, Joseph Qi wrote:
>>> Seems this series can also resolve a possible deadlock case I'm looking
>>> into.
>>
>> It removes dead code, I believe your issue is solved by
>> ("io_uring: get rid of intermediate IORING_OP_CLOSE stage")
>> https://git.kernel.dk/cgit/linux-block/commit/?h=for-5.12/io_uring&id=7be8ba3b656cb4e0158b2c859b949f34a96aa94f
>>
> I've tested the above commit and the mentioned possible deadlock still
> exists.

I pasted a wrong patch, apparently had something else on my mind...
The intention was to point to a Jens' patch that made mentioned in
your report __io_uring_files_cancel() unreachable, though it was
dropped for unrelated reasons. So... the bug is still here at the
moment.

Anyway, thanks a lot for testing! Your reports are very helpful

>> Did you try this series in particular, or tested for-5.12/io_uring
>> and see that the issue is gone there?
>>
> I don't have this tree locally and it takes too long to clone it down.
> Will check once it is ready.
> 
> Thanks,
> Joseph
> 
>>> CPU0:
>>> ...
>>> io_kill_linked_timeout  // &ctx->completion_lock
>>> io_commit_cqring
>>> __io_queue_deferred
>>> __io_queue_async_work
>>> io_wq_enqueue
>>> io_wqe_enqueue  // &wqe->lock
>>>
>>> CPU1:
>>> ...
>>> __io_uring_files_cancel
>>> io_wq_cancel_cb
>>> io_wqe_cancel_pending_work  // &wqe->lock
>>> io_cancel_task_cb  // &ctx->completion_lock
>>>

-- 
Pavel Begunkov

      reply	other threads:[~2021-01-25 11:02 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-20  2:32 [PATCH 0/3] files cancellation cleanup Pavel Begunkov
2021-01-20  2:32 ` [PATCH 1/3] io_uring: remove cancel_files and inflight tracking Pavel Begunkov
2021-01-20  2:32 ` [PATCH 2/3] io_uring: cleanup iowq cancellation files matching Pavel Begunkov
2021-01-20  2:32 ` [PATCH 3/3] io_uring: don't pass files for cancellation Pavel Begunkov
2021-01-20  3:13 ` [PATCH 0/3] files cancellation cleanup Jens Axboe
2021-01-22  9:45 ` Joseph Qi
2021-01-22 21:49   ` Pavel Begunkov
2021-01-25  2:14     ` Joseph Qi
2021-01-25 10:48       ` Pavel Begunkov [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=09aec3c5-bf2a-92cd-4388-2403ba9f4bd3@gmail.com \
    --to=asml.silence@gmail.com \
    --cc=axboe@kernel.dk \
    --cc=io-uring@vger.kernel.org \
    --cc=jiangqi903@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox