From: Pavel Begunkov <[email protected]>
To: Hillf Danton <[email protected]>
Cc: Jens Axboe <[email protected]>,
[email protected], [email protected],
[email protected]
Subject: Re: [PATCH 2/2] io_uring: fix uring_flush in exit_files() warning
Date: Sun, 17 Jan 2021 02:40:22 +0000 [thread overview]
Message-ID: <[email protected]> (raw)
In-Reply-To: <[email protected]>
On 17/01/2021 02:31, Hillf Danton wrote:
> On Sat, 16 Jan 2021 05:32:30 +0000 Pavel Begunkov wrote:
>>
>> @@ -9126,7 +9126,10 @@ static int io_uring_flush(struct file *file, void *data)
>>
>> if (ctx->flags & IORING_SETUP_SQPOLL) {
>> /* there is only one file note, which is owned by sqo_task */
>> - WARN_ON_ONCE((ctx->sqo_task == current) ==
>> + WARN_ON_ONCE(ctx->sqo_task != current &&
>> + xa_load(&tctx->xa, (unsigned long)file));
>> + /* sqo_dead check is for when this happens after cancellation */
>> + WARN_ON_ONCE(ctx->sqo_task == current && !ctx->sqo_dead &&
>> !xa_load(&tctx->xa, (unsigned long)file));
>>
>> io_disable_sqo_submit(ctx);
>
> The added sqo_dead flag can not only quiesce a warning but save a
> disabling dryrun.
Don't think I get the sentence. Do you see any issue?
sqo_dead has a practical meaning, it prevents SQPOLL task from poking
into the creator task when it's racy. But yes, also in some cases makes
draining and killing rings nicer.
--
Pavel Begunkov
prev parent reply other threads:[~2021-01-17 2:45 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-01-16 5:32 [PATCH 0/2] syzbot warning reports Pavel Begunkov
2021-01-16 5:32 ` [PATCH 1/2] io_uring: fix false positive sqo warning on flush Pavel Begunkov
2021-01-16 5:32 ` [PATCH 2/2] io_uring: fix uring_flush in exit_files() warning Pavel Begunkov
2021-01-16 19:01 ` [PATCH 0/2] syzbot warning reports Jens Axboe
[not found] ` <[email protected]>
2021-01-17 2:40 ` 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 \
[email protected] \
[email protected] \
[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