Re: [GIT PULL] pipe: nonblocking rw for io_uring
From: Linus Torvalds
Date: Mon Apr 24 2023 - 17:38:04 EST
On Mon, Apr 24, 2023 at 2:22 PM Jens Axboe <axboe@xxxxxxxxx> wrote:
>
> If we don't ever wait for IO with the pipe lock held, then we can skip
> the conditional locking. But with splice, that's not at all the case! We
> most certainly wait for IO there with the pipe lock held.
I think that then needs to just be fixed.
I really think that trylock due to "nonblocking" IO is fundamentally
wrong. Thinking that you need it is just a sign of something else
being very wrong.
That "very wrong" thing might well be splice then not honoring
non-blocking IO on a non-blocking pipe.
And I completely refuse to add that trylock hack to paper that over.
The pipe lock is *not* meant for IO.
Linus