From: David Laight <David.Laight@ACULAB.COM>
To: 'Jens Axboe' <axboe@kernel.dk>, "'Jason A. Donenfeld'" <Jason@zx2c4.com>
Cc: "viro@zeniv.linux.org.uk" <viro@zeniv.linux.org.uk>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: RE: [PATCH] fs: prefer read_iter over read and write_iter over write
Date: Mon, 23 May 2022 08:18:59 +0000 [thread overview]
Message-ID: <ec2a3eb465d244338b922f50ff5f7fd4@AcuMS.aculab.com> (raw)
In-Reply-To: <471e5654-49d7-9023-62b4-fc98483b1d89@kernel.dk>
From: Jens Axboe
> Sent: 20 May 2022 23:18
>
> On 5/20/22 4:08 PM, David Laight wrote:
> >> https://lore.kernel.org/lkml/Yoey+FOYO69lS5qP@zx2c4.com/
> >>
> >> The hope is that it eventually becomes faster... :-\
> >
> > I suspect all the xxx_iter functions need optimising for
> > the common case of a single buffer in userspace.
> >
> > That also includes the code to read the iov[] from usespace.
> > At the moment I think the 32bit compat code is actually
> > faster than the native amd64 version!
> > I've written some patches to speed that up.
> > But the bigger improvements all hit massive changes
> > to the ioring code.
>
> Do you have a link to those patches? I can certainly help with the
> io_uring side of things, and I have a genuine interest in improving the
> core and getting the iter side up to snuff.
I'll see if I can find them.
Some bits of the last patch set did get applied.
One aim was to change all the callers of import_iovec()
to use a structure than contained both the 'iov_iter' and
the 'iovstack[]'.
The lifetimes of the two structures are effectively identical.
usually they are both allocated on stack together.
Merging them would significantly simplify the callers
and reduce the number of parameters passed through
multiple layers of functions - especially pointers
passed by value.
That change needs work done to the io_uring code to sanitise
the way it uses the iovstack[] cache and any extended kmalloc()ed
copy.
I need to look elsewhere for the optimisation to import_iovec()
itself.
David
-
Registered Address Lakeside, Bramley Road, Mount Farm, Milton Keynes, MK1 1PT, UK
Registration No: 1397386 (Wales)
prev parent reply other threads:[~2022-05-23 8:19 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-05-20 13:51 Jason A. Donenfeld
2022-05-20 14:37 ` Jens Axboe
2022-05-20 15:04 ` Al Viro
2022-05-20 21:24 ` David Laight
2022-05-20 21:30 ` Jason A. Donenfeld
2022-05-20 22:08 ` David Laight
2022-05-20 22:18 ` Jens Axboe
2022-05-23 8:18 ` David Laight [this message]
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=ec2a3eb465d244338b922f50ff5f7fd4@AcuMS.aculab.com \
--to=david.laight@aculab.com \
--cc=Jason@zx2c4.com \
--cc=axboe@kernel.dk \
--cc=linux-kernel@vger.kernel.org \
--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
Powered by JetHome