All of lore.kernel.org
 help / color / mirror / Atom feed
* [RFC 0/2] nocopy bvec for direct IO
@ 2020-12-09  2:19 Pavel Begunkov
  2020-12-09  2:19 ` [PATCH 1/2] iov: introduce ITER_BVEC_FLAG_FIXED Pavel Begunkov
                   ` (4 more replies)
  0 siblings, 5 replies; 26+ messages in thread
From: Pavel Begunkov @ 2020-12-09  2:19 UTC (permalink / raw)
  To: Jens Axboe
  Cc: Alexander Viro, linux-fsdevel, io-uring, linux-block,
	linux-kernel, Christoph Hellwig, Matthew Wilcox, Ming Lei,
	Johannes Weiner

The idea is to avoid copying, merging, etc. bvec from iterator to bio
in direct I/O and use the one we've already got. Hook it up for io_uring.
Had an eye on it for a long, and it also was brought up by Matthew
just recently. Let me know if I forgot or misplaced some tags.

A benchmark got me 430KIOPS vs 540KIOPS, or +25% on bare metal. And perf
shows that bio_iov_iter_get_pages() was taking ~20%. The test is pretty
silly, but still imposing. I'll redo it closer to reality for next
iteration, anyway need to double check some cases.

If same applied to iomap, common chunck can be moved from block_dev
into bio_iov_iter_get_pages(), but if there any benefit for filesystems,
they should explicitly opt in with ITER_BVEC_FLAG_FIXED.

# how to apply
based on Jens' for-11/block
+ Ming's nr_vec patch,
+ io_uring fix, 9c3a205c5ffa36e96903c2 ("io_uring: fix ITER_BVEC check")

or there:
https://github.com/isilence/linux/commits/bvec_nocopy

# how to reproduce
null_blk queue_mode=2 completion_nsec=0 submit_queues=NUM_CPU
fio/t/io_uring with null blk, no iopoll, BS=16*4096


Cc: Christoph Hellwig <hch@infradead.org>
Cc: Matthew Wilcox <willy@infradead.org>
Cc: Ming Lei <ming.lei@redhat.com>
Cc: Johannes Weiner <hannes@cmpxchg.org>

Pavel Begunkov (2):
  iov: introduce ITER_BVEC_FLAG_FIXED
  block: no-copy bvec for direct IO

 fs/block_dev.c      | 30 +++++++++++++++++++++++++++++-
 fs/io_uring.c       |  1 +
 include/linux/uio.h | 14 +++++++++++---
 3 files changed, 41 insertions(+), 4 deletions(-)

-- 
2.24.0


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

end of thread, other threads:[~2020-12-13 22:13 UTC | newest]

Thread overview: 26+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-12-09  2:19 [RFC 0/2] nocopy bvec for direct IO Pavel Begunkov
2020-12-09  2:19 ` [PATCH 1/2] iov: introduce ITER_BVEC_FLAG_FIXED Pavel Begunkov
2020-12-09  8:36   ` Christoph Hellwig
2020-12-09  9:06     ` Christoph Hellwig
2020-12-09 11:54       ` Pavel Begunkov
2020-12-09 13:07     ` Al Viro
2020-12-09 13:37       ` Pavel Begunkov
2020-12-09 17:55         ` Christoph Hellwig
2020-12-09 18:24           ` Matthew Wilcox
2020-12-13 22:09             ` Pavel Begunkov
2020-12-09  2:19 ` [PATCH 2/2] block: no-copy bvec for direct IO Pavel Begunkov
2020-12-09  8:40   ` Christoph Hellwig
2020-12-09 12:01     ` Pavel Begunkov
2020-12-09 12:05       ` Christoph Hellwig
2020-12-09 12:03         ` Pavel Begunkov
2020-12-11 14:06     ` Johannes Weiner
2020-12-11 14:20       ` Pavel Begunkov
2020-12-11 15:38         ` Johannes Weiner
2020-12-11 15:47           ` Pavel Begunkov
2020-12-11 16:13             ` Johannes Weiner
2020-12-09 21:13   ` David Laight
2020-12-09  6:50 ` [RFC 0/2] nocopy " Christoph Hellwig
2020-12-09 11:54   ` Pavel Begunkov
2020-12-09 16:53 ` Jens Axboe
2020-12-13 22:03   ` Pavel Begunkov
2020-12-09 17:06 ` 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.