From: Jens Axboe <[email protected]>
To: Linus Torvalds <[email protected]>
Cc: io-uring <[email protected]>
Subject: Re: [GIT PULL] io_uring fixes for 6.10-rc4
Date: Fri, 14 Jun 2024 18:22:58 -0600 [thread overview]
Message-ID: <[email protected]> (raw)
In-Reply-To: <CAHk-=wiMPR5nuVp416xpwFFBb_wcdg-eRDsGQpkDv91bQkMoTQ@mail.gmail.com>
On 6/14/24 12:29 PM, Linus Torvalds wrote:
> On Fri, 14 Jun 2024 at 09:06, Jens Axboe <[email protected]> wrote:
>>
>> - Ensure that the task state is correct before attempting to grab a
>> mutex
>
> This code is horrid.
>
> That code *also* does
>
> schedule();
> __set_current_state(TASK_RUNNING);
>
> which makes no sense at all. If you just returned from schedule(), you
> *will* be running.
Yeah agree, not sure why that __set_current_state() is after schedule(),
that's obviously not needed.
> The reason you need that
>
> __set_current_state(TASK_RUNNING);
>
> in the *other* place is the very fact that you didn't call schedule at
> all after doing a
>
> prepare_to_wait(&ctx->rsrc_quiesce_wq, &we, TASK_INTERRUPTIBLE);
>
> So the bug was that the code had the __set_current_state() in exactly
> the wrong place.
>
> But the fix didn't remove the bogus one, so it all looks entirely like
> voodoo.
I'll kill that other redundant one.
--
Jens Axboe
next prev parent reply other threads:[~2024-06-15 0:23 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-06-14 16:06 [GIT PULL] io_uring fixes for 6.10-rc4 Jens Axboe
2024-06-14 18:29 ` Linus Torvalds
2024-06-15 0:22 ` Jens Axboe [this message]
2024-06-15 0:39 ` Jens Axboe
2024-06-14 18:52 ` pr-tracker-bot
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