From: Jens Axboe <axboe@kernel.dk>
To: "Jason A. Donenfeld" <Jason@zx2c4.com>
Cc: Theodore Ts'o <tytso@mit.edu>, Christoph Hellwig <hch@lst.de>,
LKML <linux-kernel@vger.kernel.org>,
Al Viro <viro@zeniv.linux.org.uk>
Subject: Re: [PATCH v4 0/3] random: convert to using iters, for Al Viro
Date: Fri, 20 May 2022 09:51:06 -0600 [thread overview]
Message-ID: <72344aad-b5ad-b317-d36d-385cb16d5204@kernel.dk> (raw)
In-Reply-To: <Yoe3vFmqx4Yua0a1@zx2c4.com>
On 5/20/22 9:46 AM, Jason A. Donenfeld wrote:
> Hi Jens,
>
> On Fri, May 20, 2022 at 09:34:46AM -0600, Jens Axboe wrote:
>> On 5/20/22 9:25 AM, Jason A. Donenfeld wrote:
>>> Are we sure we really want to do this and need to do this?
>>
>> I'm very sure, otherwise we're just accepting that we're breaking real
>> world applications.
>
> Would we really? I always thought splice() and copy_file_range() and
> sendfile() were all kind of "special" in that they mostly do not work
> for many things, and so all userspaces need fallback code. And the state
> of "mostly not working" has always just been the norm. So broken today,
> working tomorrow, broken next week would be par for the course? I might
> be *super* wrong here, so feel free to say so, but this has been my
> general impression.
No, I think that is exactly the wrong impression. If you have an
application that is written using eg splice from /dev/urandom, then it
should indeed be safe to expect that it will indeed continue working. If
we have one core tenet in the kernel it's that you should ALWAYS be able
to upgrade your kernel and not have any breakage in terms of userspace
ABI. Obviously that can happen sometimes, but I think this one is
exactly the poster child of breakage that should NOT happen. We took
away a feature that someone depended on.
This situation of splice being flakily availably is new from when it was
decided that it was OK to only have it be available if ->read_iter() and
->splice_read() is set. And that is very unfortunate.
> Anyway, I do like the idea of supporting splice() and sendfile(). The
> performance hit is just kind of sad.
I like the idea too, but this is deeper than that. We simply cannot just
break existing use cases like that.
Thankfully we do have an option here as I outlined in the previous email
- keep the ->read() and just add ->read_iter() on the side so that
splice still works. Is that ideal? No, it needs more code to support.
But hopefully that can die at some point when the performance gap is
such that we no longer need to worry about having ->read() for those
cases.
--
Jens Axboe
next prev parent reply other threads:[~2022-05-20 15:51 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-05-20 9:44 [PATCH v4 0/3] random: convert to using iters, for Al Viro Jason A. Donenfeld
2022-05-20 9:44 ` [PATCH v4 1/3] random: convert to using fops->read_iter() Jason A. Donenfeld
2022-05-20 13:37 ` Jason A. Donenfeld
2022-05-20 14:36 ` Jens Axboe
2022-05-20 14:39 ` Jason A. Donenfeld
2022-05-20 15:12 ` Al Viro
2022-05-20 9:44 ` [PATCH v4 2/3] random: convert to using fops->write_iter() Jason A. Donenfeld
2022-05-20 9:44 ` [PATCH v4 3/3] random: wire up fops->splice_{read,write}_iter() Jason A. Donenfeld
2022-05-20 12:16 ` [PATCH v4 0/3] random: convert to using iters, for Al Viro Jens Axboe
2022-05-20 15:25 ` Jason A. Donenfeld
2022-05-20 15:34 ` Jens Axboe
2022-05-20 15:39 ` Jason A. Donenfeld
2022-05-20 15:44 ` Jens Axboe
2022-05-20 15:55 ` Jason A. Donenfeld
2022-05-20 15:58 ` Jens Axboe
2022-05-20 16:03 ` Jason A. Donenfeld
2022-05-20 16:06 ` Jens Axboe
2022-05-20 15:46 ` Jason A. Donenfeld
2022-05-20 15:51 ` Jens Axboe [this message]
2022-05-20 15:58 ` Jason A. Donenfeld
2022-05-20 16:00 ` Jens Axboe
2022-05-20 15:47 ` Al Viro
2022-05-20 15:53 ` Jens Axboe
2022-05-20 16:15 ` Al Viro
2022-05-20 16:24 ` Jens Axboe
2022-05-20 16:39 ` Jason A. Donenfeld
2022-05-20 16:41 ` Jens Axboe
2022-05-24 4:52 ` Eric W. Biederman
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=72344aad-b5ad-b317-d36d-385cb16d5204@kernel.dk \
--to=axboe@kernel.dk \
--cc=Jason@zx2c4.com \
--cc=hch@lst.de \
--cc=linux-kernel@vger.kernel.org \
--cc=tytso@mit.edu \
--cc=viro@zeniv.linux.org.uk \
/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