From: Linus Torvalds <[email protected]>
To: Jens Axboe <[email protected]>
Cc: io-uring <[email protected]>
Subject: Re: [GIT PULL] io_uring updates for 5.16-rc1
Date: Mon, 1 Nov 2021 09:49:25 -0700 [thread overview]
Message-ID: <CAHk-=whuMiJ3LdGZGPsKR+FuM4v4Qz6Xp-dnr7G3QN3Nr24NdA@mail.gmail.com> (raw)
In-Reply-To: <[email protected]>
On Sun, Oct 31, 2021 at 12:41 PM Jens Axboe <[email protected]> wrote:
>
> This will throw two merge conflicts, see below for how I resolved it.
> There are two spots, one is trivial, and the other needs
> io_queue_linked_timeout() moved into io_queue_sqe_arm_apoll().
So I ended up resolving it the same way you did, because that was the
mindless direct thing.
But I don't much like it.
Basically, io_queue_sqe_arm_apoll() now ends up doing
case IO_APOLL_READY:
if (linked_timeout) {
io_queue_linked_timeout(linked_timeout);
linked_timeout = NULL;
}
io_req_task_queue(req);
break;
...
if (linked_timeout)
io_queue_linked_timeout(linked_timeout);
and that really seems *completely* pointless. Notice how it does that
if (linked_timeout)
io_queue_linked_timeout()
basically twice, and sets linked_timeout to NULL just to avoid the second one...
Why isn't it just
case IO_APOLL_READY:
io_req_task_queue(req);
break;
...
if (linked_timeout)
io_queue_linked_timeout(linked_timeout);
where the only difference would seem to be the order of operations
between io_req_task_queue() and io_queue_linked_timeout()?
Does the order of operations really matter here? As far as I can tell,
io_req_task_queue() really just queues up work for later, so it's not
really very ordered wrt that io_queue_linked_timeout(), and in the
_other_ case statement it's apparently fine to do that
io_queue_async_work() before the io_queue_linked_timeout()..
Again - I ended up resolving this the same way you had done, because I
don't know the exact rules here well enough to do anything else. But
it _looks_ a bit messy.
Hmm?
Linus
next prev parent reply other threads:[~2021-11-01 16:49 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-10-31 19:41 [GIT PULL] io_uring updates for 5.16-rc1 Jens Axboe
2021-11-01 16:49 ` Linus Torvalds [this message]
2021-11-01 17:06 ` Jens Axboe
2021-11-01 17:28 ` 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 \
--in-reply-to='CAHk-=whuMiJ3LdGZGPsKR+FuM4v4Qz6Xp-dnr7G3QN3Nr24NdA@mail.gmail.com' \
[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