Messages in this thread | | | Date | Fri, 20 May 2022 23:30:43 +0200 | From | "Jason A. Donenfeld" <> | Subject | Re: [PATCH] fs: prefer read_iter over read and write_iter over write |
| |
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
| |