All of lore.kernel.org
 help / color / mirror / Atom feed
* [RFC][PATCHES] iov_iter stuff
@ 2022-06-07  4:08 Al Viro
  2022-06-07  4:09 ` [PATCH 1/9] No need of likely/unlikely on calls of check_copy_size() Al Viro
                   ` (10 more replies)
  0 siblings, 11 replies; 93+ messages in thread
From: Al Viro @ 2022-06-07  4:08 UTC (permalink / raw)
  To: linux-fsdevel; +Cc: Jens Axboe, Christoph Hellwig, Matthew Wilcox

	Rebased to -rc1 and reordered.  Sits in vfs.git #work.iov_iter,
individual patches in followups

1/9: No need of likely/unlikely on calls of check_copy_size()
	not just in uio.h; the thing is inlined and it has unlikely on
all paths leading to return false

2/9: btrfs_direct_write(): cleaner way to handle generic_write_sync() suppression
	new flag for iomap_dio_rw(), telling it to suppress generic_write_sync()

3/9: struct file: use anonymous union member for rcuhead and llist
	"f_u" might have been an amusing name, but... we expect anon unions to
work.

4/9: iocb: delay evaluation of IS_SYNC(...) until we want to check IOCB_DSYNC
	makes iocb_flags() much cheaper, and it's easier to keep track of
the places where it can change.

5/9: keep iocb_flags() result cached in struct file
	that, along with the previous commit, reduces the overhead of
new_sync_{read,write}().  struct file doesn't grow - we can keep that
thing in the same anon union where rcuhead and llist live; that field
gets used only before ->f_count reaches zero while the other two are
used only after ->f_count has reached zero.

6/9: copy_page_{to,from}_iter(): switch iovec variants to generic
	kmap_local_page() allows that.  And it kills quite a bit of
code.

7/9: new iov_iter flavour - ITER_UBUF
	iovec analogue, with single segment.  That case is fairly common and it
can be handled with less overhead than full-blown iovec.

8/9: switch new_sync_{read,write}() to ITER_UBUF
	... and this is why it is so common.  Further reduction of overhead
for new_sync_{read,write}().

9/9: iov_iter_bvec_advance(): don't bother with bvec_iter
	AFAICS, variant similar to what we do for iovec/kvec generates better
code.  Needs profiling, obviously.

Diffstat:
 arch/powerpc/include/asm/uaccess.h |   2 +-
 arch/s390/include/asm/uaccess.h    |   4 +-
 block/fops.c                       |   8 +-
 drivers/nvme/target/io-cmd-file.c  |   2 +-
 fs/aio.c                           |   2 +-
 fs/btrfs/file.c                    |  19 +--
 fs/btrfs/inode.c                   |   2 +-
 fs/ceph/file.c                     |   2 +-
 fs/cifs/file.c                     |   2 +-
 fs/direct-io.c                     |   4 +-
 fs/fcntl.c                         |   1 +
 fs/file_table.c                    |  17 +-
 fs/fuse/dev.c                      |   4 +-
 fs/fuse/file.c                     |   4 +-
 fs/gfs2/file.c                     |   2 +-
 fs/io_uring.c                      |   2 +-
 fs/iomap/direct-io.c               |  24 +--
 fs/nfs/direct.c                    |   2 +-
 fs/open.c                          |   1 +
 fs/read_write.c                    |   6 +-
 fs/zonefs/super.c                  |   2 +-
 include/linux/fs.h                 |  21 ++-
 include/linux/iomap.h              |   2 +
 include/linux/uaccess.h            |   4 +-
 include/linux/uio.h                |  41 +++--
 lib/iov_iter.c                     | 308 +++++++++++--------------------------
 mm/shmem.c                         |   2 +-
 27 files changed, 191 insertions(+), 299 deletions(-)

^ permalink raw reply	[flat|nested] 93+ messages in thread

end of thread, other threads:[~2022-06-19  4:12 UTC | newest]

Thread overview: 93+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-06-07  4:08 [RFC][PATCHES] iov_iter stuff Al Viro
2022-06-07  4:09 ` [PATCH 1/9] No need of likely/unlikely on calls of check_copy_size() Al Viro
2022-06-07  4:41   ` Christoph Hellwig
2022-06-07 11:49   ` Christian Brauner
2022-06-07  4:09 ` [PATCH 2/9] btrfs_direct_write(): cleaner way to handle generic_write_sync() suppression Al Viro
2022-06-07  4:42   ` Christoph Hellwig
2022-06-07 16:06     ` Al Viro
2022-06-07 23:27       ` Al Viro
2022-06-07 23:31         ` [PATCH 01/10] No need of likely/unlikely on calls of check_copy_size() Al Viro
2022-06-07 23:31           ` [PATCH 02/10] teach iomap_dio_rw() to suppress dsync Al Viro
2022-06-08  6:18             ` Christoph Hellwig
2022-06-08 15:17             ` Darrick J. Wong
2022-06-10 11:38             ` Christian Brauner
2022-06-07 23:31           ` [PATCH 03/10] btrfs: use IOMAP_DIO_NOSYNC Al Viro
2022-06-08  6:18             ` Christoph Hellwig
2022-06-10 11:09             ` Christian Brauner
2022-06-07 23:31           ` [PATCH 04/10] struct file: use anonymous union member for rcuhead and llist Al Viro
2022-06-07 23:31           ` [PATCH 05/10] iocb: delay evaluation of IS_SYNC(...) until we want to check IOCB_DSYNC Al Viro
2022-06-10 11:41             ` Christian Brauner
2022-06-07 23:31           ` [PATCH 06/10] keep iocb_flags() result cached in struct file Al Viro
2022-06-09  0:35             ` Dave Chinner
2022-06-10 11:43             ` Christian Brauner
2022-06-07 23:31           ` [PATCH 07/10] copy_page_{to,from}_iter(): switch iovec variants to generic Al Viro
2022-06-07 23:31           ` [PATCH 08/10] new iov_iter flavour - ITER_UBUF Al Viro
2022-06-07 23:31           ` [PATCH 09/10] switch new_sync_{read,write}() to ITER_UBUF Al Viro
2022-06-10 11:11             ` Christian Brauner
2022-06-07 23:31           ` [PATCH 10/10] iov_iter_bvec_advance(): don't bother with bvec_iter Al Viro
2022-06-08  6:16       ` [PATCH 2/9] btrfs_direct_write(): cleaner way to handle generic_write_sync() suppression Christoph Hellwig
2022-06-07 14:49   ` Matthew Wilcox
2022-06-07 20:17     ` Al Viro
2022-06-07  4:10 ` [PATCH 3/9] struct file: use anonymous union member for rcuhead and llist Al Viro
2022-06-07 10:18   ` Jan Kara
2022-06-07 11:46   ` Christian Brauner
2022-06-07  4:11 ` [PATCH 4/9] iocb: delay evaluation of IS_SYNC(...) until we want to check IOCB_DSYNC Al Viro
2022-06-07 10:34   ` Jan Kara
2022-06-07 15:34     ` Al Viro
2022-06-07  4:11 ` [PATCH 5/9] keep iocb_flags() result cached in struct file Al Viro
2022-06-07  4:12 ` [PATCH 6/9] copy_page_{to,from}_iter(): switch iovec variants to generic Al Viro
2022-06-07  4:12 ` [PATCH 7/9] new iov_iter flavour - ITER_UBUF Al Viro
2022-06-07  4:13 ` [PATCH 8/9] switch new_sync_{read,write}() to ITER_UBUF Al Viro
2022-06-07  4:13 ` [PATCH 9/9] iov_iter_bvec_advance(): don't bother with bvec_iter Al Viro
2022-06-08 19:28 ` [RFC][PATCHES] iov_iter stuff Sedat Dilek
2022-06-08 20:39   ` Al Viro
2022-06-09 19:10     ` Sedat Dilek
2022-06-09 19:22       ` Matthew Wilcox
2022-06-09 19:58         ` Matthew Wilcox
2022-06-09 19:45       ` Al Viro
2022-06-17 22:30 ` Jens Axboe
2022-06-17 22:48   ` Al Viro
2022-06-18  5:27     ` Al Viro
2022-06-18  5:35       ` [PATCH 01/31] splice: stop abusing iov_iter_advance() to flush a pipe Al Viro
2022-06-18  5:35         ` [PATCH 02/31] ITER_PIPE: helper for getting pipe buffer by index Al Viro
2022-06-18  5:35         ` [PATCH 03/31] ITER_PIPE: helpers for adding pipe buffers Al Viro
2022-06-18  5:35         ` [PATCH 04/31] ITER_PIPE: allocate buffers as we go in copy-to-pipe primitives Al Viro
2022-06-19  1:34           ` Al Viro
2022-06-18  5:35         ` [PATCH 05/31] ITER_PIPE: fold push_pipe() into __pipe_get_pages() Al Viro
2022-06-18  5:35         ` [PATCH 06/31] ITER_PIPE: lose iter_head argument of __pipe_get_pages() Al Viro
2022-06-18  5:35         ` [PATCH 07/31] ITER_PIPE: clean pipe_advance() up Al Viro
2022-06-18  5:35         ` [PATCH 08/31] ITER_PIPE: clean iov_iter_revert() Al Viro
2022-06-18  5:35         ` [PATCH 09/31] ITER_PIPE: cache the type of last buffer Al Viro
2022-06-18  5:35         ` [PATCH 10/10] iov_iter_bvec_advance(): don't bother with bvec_iter Al Viro
2022-06-18  5:35         ` [PATCH 10/31] ITER_PIPE: fold data_start() and pipe_space_for_user() together Al Viro
2022-06-19  2:25           ` Al Viro
2022-06-18  5:35         ` [PATCH 11/31] iov_iter_get_pages{,_alloc}(): cap the maxsize with LONG_MAX Al Viro
2022-06-18  5:35         ` [PATCH 12/31] iov_iter_get_pages_alloc(): lift freeing pages array on failure exits into wrapper Al Viro
2022-06-18  5:35         ` [PATCH 13/31] iov_iter_get_pages(): sanity-check arguments Al Viro
2022-06-19  3:07           ` Al Viro
2022-06-18  5:35         ` [PATCH 14/31] unify pipe_get_pages() and pipe_get_pages_alloc() Al Viro
2022-06-18  5:35         ` [PATCH 15/31] unify xarray_get_pages() and xarray_get_pages_alloc() Al Viro
2022-06-18  5:35         ` [PATCH 16/31] unify the rest of iov_iter_get_pages()/iov_iter_get_pages_alloc() guts Al Viro
2022-06-19  3:56           ` Al Viro
2022-06-18  5:35         ` [PATCH 17/31] ITER_XARRAY: don't open-code DIV_ROUND_UP() Al Viro
2022-06-18  5:35         ` [PATCH 18/31] iov_iter: lift dealing with maxpages out of first_{iovec,bvec}_segment() Al Viro
2022-06-18  5:35         ` [PATCH 19/31] iov_iter: massage calling conventions for first_{iovec,bvec}_segment() Al Viro
2022-06-18 11:13           ` Al Viro
2022-06-18 11:18             ` Al Viro
2022-06-18  5:35         ` [PATCH 20/31] found_iovec_segment(): just return address Al Viro
2022-06-18  5:35         ` [PATCH 21/31] fold __pipe_get_pages() into pipe_get_pages() Al Viro
2022-06-18  5:35         ` [PATCH 22/31] iov_iter: saner helper for page array allocation Al Viro
2022-06-18 11:14           ` Al Viro
2022-06-18  5:35         ` [PATCH 23/31] iov_iter: advancing variants of iov_iter_get_pages{,_alloc}() Al Viro
2022-06-18  5:35         ` [PATCH 24/31] block: convert to " Al Viro
2022-06-18  5:35         ` [PATCH 25/31] iter_to_pipe(): switch to advancing variant of iov_iter_get_pages() Al Viro
2022-06-18  5:35         ` [PATCH 26/31] af_alg_make_sg(): " Al Viro
2022-06-18  5:35         ` [PATCH 27/31] 9p: convert to advancing variant of iov_iter_get_pages_alloc() Al Viro
2022-06-18  5:35         ` [PATCH 28/31] ceph: switch the last caller " Al Viro
2022-06-18  5:35         ` [PATCH 29/31] get rid of non-advancing variants Al Viro
2022-06-18 11:14           ` Al Viro
2022-06-18  5:35         ` [PATCH 30/31] pipe_get_pages(): switch to append_pipe() Al Viro
2022-06-19  4:01           ` Al Viro
2022-06-19  4:09             ` Al Viro
2022-06-18  5:35         ` [PATCH 31/31] expand those iov_iter_advance() Al Viro
2022-06-18 11:14           ` Al Viro

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.