linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Linus Torvalds <torvalds@linux-foundation.org>
To: Jens Axboe <axboe@kernel.dk>
Cc: io-uring <io-uring@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [GIT PULL] io_uring fixes for 5.6-rc2
Date: Fri, 14 Feb 2020 14:07:48 -0800	[thread overview]
Message-ID: <CAHk-=wixEw+wKJzwfEFnBYLNt5zU6zA2kpNVu_36e33_zsawKA@mail.gmail.com> (raw)
In-Reply-To: <d72d51a9-488d-c75b-4daf-bb74960c7531@kernel.dk>

On Fri, Feb 14, 2020 at 8:45 AM Jens Axboe <axboe@kernel.dk> wrote:
>
> Here's a set of fixes for io_uring that should go into this release.

Whaa?

          for_each_node(node) {
+                if (!node_online(node))
+                        continue;

that's just silly.

We have 'for_each_online_node()' for this.

There's something like four patterns of that pointless thing.

And in io_wq_create(), do you really want to allocate that wqe for
nodes that aren't online? Right now you _allocate_ the node data for
them (using a non-node-specific allocation), but then you won't
actually create the thread for them io_wq_manager().

Plus if the node online status changes, it looks like you'll mess up
_anyway_, in that  io_wq_manager() will first create the workers on
one set of nodes, but then perhaps set the state flags for a
completely different set of nodes if some onlining/offlining has
happened.

I've pulled this, but Jens, you need to be more careful. This all
looks like completely random state that nobody spent any time thinking
about.

Seriously, this "io_uring FIXES ONLY" needs to be stricter than what
you seem to be doing here. This "fix" is opening up a lot of new
possibilities for inconsistencies in the data structures.

               Linus

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

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-02-14 16:45 [GIT PULL] io_uring fixes for 5.6-rc2 Jens Axboe
2020-02-14 22:07 ` Linus Torvalds [this message]
2020-02-15  1:20   ` Jens Axboe
2020-02-15 18:40 ` 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-=wixEw+wKJzwfEFnBYLNt5zU6zA2kpNVu_36e33_zsawKA@mail.gmail.com' \
    --to=torvalds@linux-foundation.org \
    --cc=axboe@kernel.dk \
    --cc=io-uring@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    /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;
as well as URLs for NNTP newsgroup(s).