public inbox for [email protected]
 help / color / mirror / Atom feed
From: Jens Axboe <[email protected]>
To: Pavel Begunkov <[email protected]>, [email protected]
Subject: Re: [PATCH 1/1] io_uring/io-wq: close io-wq full-stop gap
Date: Wed, 26 May 2021 09:03:53 -0600	[thread overview]
Message-ID: <[email protected]> (raw)
In-Reply-To: <abfcf8c54cb9e8f7bfbad7e9a0cc5433cc70bdc2.1621781238.git.asml.silence@gmail.com>

On 5/23/21 8:48 AM, Pavel Begunkov wrote:
> There is an old problem with io-wq cancellation where requests should be
> killed and are in io-wq but are not discoverable, e.g. in @next_hashed
> or @linked vars of io_worker_handle_work(). It adds some unreliability
> to individual request canellation, but also may potentially get
> __io_uring_cancel() stuck. For instance:
> 
> 1) An __io_uring_cancel()'s cancellation round have not found any
>    request but there are some as desribed.
> 2) __io_uring_cancel() goes to sleep
> 3) Then workers wake up and try to execute those hidden requests
>    that happen to be unbound.
> 
> As we already cancel all requests of io-wq there, set IO_WQ_BIT_EXIT
> in advance, so preventing 3) from executing unbound requests. The
> workers will initially break looping because of getting a signal as they
> are threads of the dying/exec()'ing user task.

Applied, thanks.

-- 
Jens Axboe


      reply	other threads:[~2021-05-26 15:03 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-23 14:48 [PATCH 1/1] io_uring/io-wq: close io-wq full-stop gap Pavel Begunkov
2021-05-26 15:03 ` Jens Axboe [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 \
    [email protected] \
    [email protected] \
    [email protected] \
    [email protected] \
    /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