public inbox for [email protected]
 help / color / mirror / Atom feed
From: Jens Axboe <[email protected]>
To: Xiaoguang Wang <[email protected]>,
	[email protected]
Cc: [email protected]
Subject: Re: [PATCH] io_uring: fix __io_iopoll_check deadlock in io_sq_thread
Date: Sat, 22 Feb 2020 06:45:33 -0800	[thread overview]
Message-ID: <[email protected]> (raw)
In-Reply-To: <[email protected]>

On 2/21/20 11:46 PM, Xiaoguang Wang wrote:
> Since commit a3a0e43fd770 ("io_uring: don't enter poll loop if we have
> CQEs pending"), if we already events pending, we won't enter poll loop.
> In case SETUP_IOPOLL and SETUP_SQPOLL are both enabled, if app has
> been terminated and don't reap pengding events which are already in cq
> ring, and there are some reqs in poll_list, io_sq_thread will enter
> __io_iopoll_check(), and find pending events, then return, this loop
> will never have a chance to exit.
> 
> I have seem this issue in fio stress tests, to fix this issue, let
> io_sq_thread call io_iopoll_getevents() with argument 'min' being zero,
> and remove __io_iopoll_check().

Thanks, nice and clean fix. Applied for 5.6.

-- 
Jens Axboe


      reply	other threads:[~2020-02-22 14:45 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-02-22  6:46 [PATCH] io_uring: fix __io_iopoll_check deadlock in io_sq_thread Xiaoguang Wang
2020-02-22 14:45 ` 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] \
    [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