public inbox for [email protected]
 help / color / mirror / Atom feed
* [GIT PULL] io_uring fixes for 5.6-rc2
@ 2020-02-14 16:45 Jens Axboe
  2020-02-14 22:07 ` Linus Torvalds
  2020-02-15 18:40 ` pr-tracker-bot
  0 siblings, 2 replies; 4+ messages in thread
From: Jens Axboe @ 2020-02-14 16:45 UTC (permalink / raw)
  To: Linus Torvalds; +Cc: io-uring, [email protected]

Hi Linus,

Here's a set of fixes for io_uring that should go into this release.
This pull request contains:

- Various fixes with cleanups from Pavel, fixing corner cases where
  we're not correctly dealing with iovec cleanup.

- Clarify that statx/openat/openat2 don't accept fixed files

- Buffered raw device write EOPTNOTSUPP fix

- Ensure async workers grab current->fs

- A few task exit fixes with pending requests that grab the file table

- send/recvmsg async load fix

- io-wq offline node setup fix

- CQ overflow flush in poll

Please pull!


  git://git.kernel.dk/linux-block.git tags/io_uring-5.6-2020-02-14


----------------------------------------------------------------
Jens Axboe (11):
      io_uring: statx/openat/openat2 don't support fixed files
      io_uring: retry raw bdev writes if we hit -EOPNOTSUPP
      io-wq: add support for inheriting ->fs
      io_uring: grab ->fs as part of async preparation
      io_uring: allow AT_FDCWD for non-file openat/openat2/statx
      io-wq: make io_wqe_cancel_work() take a match handler
      io-wq: add io_wq_cancel_pid() to cancel based on a specific pid
      io_uring: cancel pending async work if task exits
      io_uring: retain sockaddr_storage across send/recvmsg async punt
      io-wq: don't call kXalloc_node() with non-online node
      io_uring: prune request from overflow list on flush

Pavel Begunkov (8):
      io_uring: get rid of delayed mm check
      io_uring: fix deferred req iovec leak
      io_uring: remove unused struct io_async_open
      io_uring: fix iovec leaks
      io_uring: add cleanup for openat()/statx()
      io_uring: fix async close() with f_op->flush()
      io_uring: fix double prep iovec leak
      io_uring: fix openat/statx's filename leak

Randy Dunlap (1):
      io_uring: fix 1-bit bitfields to be unsigned

Stefano Garzarella (1):
      io_uring: flush overflowed CQ events in the io_uring_poll()

 fs/io-wq.c    |  92 +++++++++++++++---
 fs/io-wq.h    |   6 +-
 fs/io_uring.c | 299 +++++++++++++++++++++++++++++++++++++++-------------------
 3 files changed, 284 insertions(+), 113 deletions(-)

-- 
Jens Axboe


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [GIT PULL] io_uring fixes for 5.6-rc2
  2020-02-14 16:45 [GIT PULL] io_uring fixes for 5.6-rc2 Jens Axboe
@ 2020-02-14 22:07 ` Linus Torvalds
  2020-02-15  1:20   ` Jens Axboe
  2020-02-15 18:40 ` pr-tracker-bot
  1 sibling, 1 reply; 4+ messages in thread
From: Linus Torvalds @ 2020-02-14 22:07 UTC (permalink / raw)
  To: Jens Axboe; +Cc: io-uring, [email protected]

On Fri, Feb 14, 2020 at 8:45 AM Jens Axboe <[email protected]> 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

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [GIT PULL] io_uring fixes for 5.6-rc2
  2020-02-14 22:07 ` Linus Torvalds
@ 2020-02-15  1:20   ` Jens Axboe
  0 siblings, 0 replies; 4+ messages in thread
From: Jens Axboe @ 2020-02-15  1:20 UTC (permalink / raw)
  To: Linus Torvalds; +Cc: io-uring, [email protected]

On 2/14/20 3:07 PM, Linus Torvalds wrote:
> On Fri, Feb 14, 2020 at 8:45 AM Jens Axboe <[email protected]> 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.

Sorry, that definitely should have been for_each_online_node() for
those, guess I didn't think of that when making the change.

> 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().

I was thinking about this a bit, and as far as I know there's no good
way to get notified of nodes coming and going. And I'd really like
to avoid having to add that to the fast path.

So this seemed like the lesser of evils, we setup the wqe just in
case the node does come online, and then rely on the manager
creating the thread when we need it. Not sure what setup was run
to create it, I haven't come across any boxes where we have nodes
that are present but not online.

> 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.

We'll look into making this more clear and bullet proof.

> 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.

We'll get it sorted for 5.6. Thanks for pulling.

-- 
Jens Axboe


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [GIT PULL] io_uring fixes for 5.6-rc2
  2020-02-14 16:45 [GIT PULL] io_uring fixes for 5.6-rc2 Jens Axboe
  2020-02-14 22:07 ` Linus Torvalds
@ 2020-02-15 18:40 ` pr-tracker-bot
  1 sibling, 0 replies; 4+ messages in thread
From: pr-tracker-bot @ 2020-02-15 18:40 UTC (permalink / raw)
  To: Jens Axboe; +Cc: Linus Torvalds, io-uring, [email protected]

The pull request you sent on Fri, 14 Feb 2020 09:45:26 -0700:

> git://git.kernel.dk/linux-block.git tags/io_uring-5.6-2020-02-14

has been merged into torvalds/linux.git:
https://git.kernel.org/torvalds/c/ca60ad6a6bc4aa88c02c6f103dd80df54689ea4d

Thank you!

-- 
Deet-doot-dot, I am a bot.
https://korg.wiki.kernel.org/userdoc/prtracker

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2020-02-15 18:40 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-02-14 16:45 [GIT PULL] io_uring fixes for 5.6-rc2 Jens Axboe
2020-02-14 22:07 ` Linus Torvalds
2020-02-15  1:20   ` Jens Axboe
2020-02-15 18:40 ` pr-tracker-bot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox