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 5.10] io_uring: don't forget to task-cancel drained reqs
Date: Thu, 5 Nov 2020 09:53:22 -0700	[thread overview]
Message-ID: <[email protected]> (raw)
In-Reply-To: <d507a3d66353d83b20d8a5e2722e8e437233449a.1604585149.git.asml.silence@gmail.com>

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


      reply	other threads:[~2020-11-05 16:53 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-05 14:06 [PATCH 5.10] io_uring: don't forget to task-cancel drained reqs Pavel Begunkov
2020-11-05 16:53 ` 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