From: Pavel Begunkov <[email protected]>
To: [email protected]
Cc: Jens Axboe <[email protected]>,
Christoph Hellwig <[email protected]>,
Matthew Wilcox <[email protected]>,
Ming Lei <[email protected]>,
Johannes Weiner <[email protected]>,
Alexander Viro <[email protected]>,
"Darrick J . Wong" <[email protected]>,
"Martin K . Petersen" <[email protected]>,
Jonathan Corbet <[email protected]>,
[email protected], [email protected],
[email protected], [email protected],
[email protected], [email protected],
[email protected]
Subject: [PATCH v2 0/7] no-copy bvec
Date: Sat, 2 Jan 2021 15:17:32 +0000 [thread overview]
Message-ID: <[email protected]> (raw)
Currently, when iomap and block direct IO gets a bvec based iterator
the bvec will be copied, with all other accounting that takes much
CPU time and causes additional allocation for larger bvecs. The
patchset makes it to reuse the passed in iter bvec.
[1,2] are forbidding zero-length bvec segments to not pile special
cases, [3] skip/fix PSI tracking to not iterate over bvecs extra
time.
nullblk completion_nsec=0 submit_queues=NR_CORES, no merges, no stats
fio/t/io_uring /dev/nullb0 -d 128 -s 32 -c 32 -p 0 -B 1 -F 1 -b BLOCK_SIZE
BLOCK_SIZE 512 4K 8K 16K 32K 64K
===================================================================
old (KIOPS) 1208 1208 1131 1039 863 699
new (KIOPS) 1222 1222 1170 1137 1083 982
Previously, Jens got before 10% difference for polling real HW and small
block sizes, but that was for an older version that had one
iov_iter_advance() less
since RFC:
- add target_core_file patch by Christoph
- make no-copy default behaviour, remove iter flag
- iter_advance() instead of hacks to revert to work
- add bvec iter_advance() optimisation patch
- remove PSI annotations from direct IO (iomap, block and fs/direct)
- note in d/f/porting
since v1:
- don't allow zero-length bvec segments (Ming)
- don't add a BIO_WORKINGSET-less version of bio_add_page(), just clear
the flag at the end and leave it for further cleanups (Christoph)
- commit message and comments rewording (Dave)
- other nits by Christoph
Christoph Hellwig (1):
target/file: allocate the bvec array as part of struct
target_core_file_cmd
Pavel Begunkov (6):
splice: don't generate zero-len segement bvecs
bvec/iter: disallow zero-length segment bvecs
block/psi: remove PSI annotations from direct IO
iov_iter: optimise bvec iov_iter_advance()
bio: add a helper calculating nr segments to alloc
bio: don't copy bvec for direct IO
Documentation/filesystems/porting.rst | 16 ++++++
block/bio.c | 71 +++++++++++++--------------
drivers/target/target_core_file.c | 20 +++-----
fs/block_dev.c | 7 +--
fs/direct-io.c | 2 +
fs/iomap/direct-io.c | 9 ++--
fs/splice.c | 9 ++--
include/linux/bio.h | 13 +++++
lib/iov_iter.c | 21 +++++++-
9 files changed, 103 insertions(+), 65 deletions(-)
--
2.24.0
next reply other threads:[~2021-01-02 15:23 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-01-02 15:17 Pavel Begunkov [this message]
2021-01-02 15:17 ` [PATCH v2 1/7] splice: don't generate zero-len segement bvecs Pavel Begunkov
2021-01-04 16:17 ` Christoph Hellwig
2021-01-04 16:54 ` Pavel Begunkov
2021-01-02 15:17 ` [PATCH v2 2/7] bvec/iter: disallow zero-length segment bvecs Pavel Begunkov
2021-01-04 16:18 ` Christoph Hellwig
2021-01-04 16:37 ` Matthew Wilcox
2021-01-04 17:23 ` Pavel Begunkov
2021-01-02 15:17 ` [PATCH v2 3/7] block/psi: remove PSI annotations from direct IO Pavel Begunkov
2021-01-04 16:45 ` Christoph Hellwig
2021-01-02 15:17 ` [PATCH v2 4/7] target/file: allocate the bvec array as part of struct target_core_file_cmd Pavel Begunkov
2021-01-02 15:17 ` [PATCH v2 5/7] iov_iter: optimise bvec iov_iter_advance() Pavel Begunkov
2021-01-02 15:17 ` [PATCH v2 6/7] bio: add a helper calculating nr segments to alloc Pavel Begunkov
2021-01-02 15:17 ` [PATCH v2 7/7] bio: don't copy bvec for direct IO Pavel Begunkov
2021-01-04 16:20 ` Christoph Hellwig
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 \
[email protected] \
[email protected] \
[email protected] \
[email protected] \
[email protected] \
[email protected] \
[email protected] \
[email protected] \
[email protected] \
[email protected] \
[email protected] \
[email protected] \
[email protected] \
[email protected] \
[email protected] \
[email protected] \
[email protected] \
[email protected] \
[email protected] \
/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