public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: "Jason A. Donenfeld" <Jason@zx2c4.com>
To: David Laight <David.Laight@ACULAB.COM>
Cc: "viro@zeniv.linux.org.uk" <viro@zeniv.linux.org.uk>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	Jens Axboe <axboe@kernel.dk>
Subject: Re: [PATCH] fs: prefer read_iter over read and write_iter over write
Date: Fri, 20 May 2022 23:30:43 +0200	[thread overview]
Message-ID: <YogIg9FG7C/f98bf@zx2c4.com> (raw)
In-Reply-To: <39ed6917f2e64a07bad8dad63f8dceb4@AcuMS.aculab.com>

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:

   https://lore.kernel.org/lkml/Yoey+FOYO69lS5qP@zx2c4.com/

The hope is that it eventually becomes faster... :-\

Jason

  reply	other threads:[~2022-05-20 21:31 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-20 13:51 [PATCH] fs: prefer read_iter over read and write_iter over write 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 [this message]
2022-05-20 22:08     ` David Laight
2022-05-20 22:18       ` Jens Axboe
2022-05-23  8:18         ` David Laight

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=YogIg9FG7C/f98bf@zx2c4.com \
    --to=jason@zx2c4.com \
    --cc=David.Laight@ACULAB.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