lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <0da16e16caed4282ae97a86f1ba6f6db@AcuMS.aculab.com>
Date:   Fri, 20 May 2022 22:08:00 +0000
From:   David Laight <David.Laight@...LAB.COM>
To:     "'Jason A. Donenfeld'" <Jason@...c4.com>
CC:     "viro@...iv.linux.org.uk" <viro@...iv.linux.org.uk>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        Jens Axboe <axboe@...nel.dk>
Subject: RE: [PATCH] fs: prefer read_iter over read and write_iter over write

From: Jason A. Donenfeld
> Sent: 20 May 2022 22:31
> 
> Hi David,
> 
> On Fri, May 20, 2022 at 09:24:50PM +0000, David Laight wrote:
> > From: Jason A. Donenfeld
> > > Sent: 20 May 2022 14:51
> > >
> > > Most kernel code prefers read_iter over read and write_iter over write,
> > > yet the read function pointer is tested first. Reverse these so that the
> > > iter function is always used first.
> >
> > There will be a measurable performance hit for the xxx_iter versions.
> 
> Indeed. We now have the misfortune of a 3% hit on random.c, per this
> sub-thread:

I wrote that a few hours ago and forgot to send it :-(

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

	David

-
Registered Address Lakeside, Bramley Road, Mount Farm, Milton Keynes, MK1 1PT, UK
Registration No: 1397386 (Wales)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ