From: Jens Axboe <[email protected]>
To: Linus Torvalds <[email protected]>
Cc: io-uring <[email protected]>,
[email protected], LKML <[email protected]>
Subject: [GIT PULL] io_uring support for buffered writes
Date: Sun, 31 Jul 2022 09:03:30 -0600 [thread overview]
Message-ID: <[email protected]> (raw)
Hi Linus,
On top of the core io_uring changes for 5.20, this pull request contains
support for buffered writes, specifically for XFS. btrfs is in progress,
will be coming in the next release.
io_uring does support buffered writes on any file type, but since the
buffered write path just always -EAGAIN (or -EOPNOTSUPP) any attempt to
do so if IOCB_NOWAIT is set, any buffered write will effectively be
handled by io-wq offload. This isn't very efficient, and we even have
specific code in io-wq to serialize buffered writes to the same inode to
avoid further inefficiencies with thread offload.
This is particularly sad since most buffered writes don't block, they
simply copy data to a page and dirty it. With this pull request, we can
handle buffered writes a lot more effiently. If balance_dirty_pages()
needs to block, we back off on writes as indicated.
This improves buffered write support by 2-3x.
Jan Kara helped with the mm bits for this, and Stefan handled the
fs/iomap/xfs/io_uring parts of it.
Please pull!
The following changes since commit f6b543fd03d347e8bf245cee4f2d54eb6ffd8fcb:
io_uring: ensure REQ_F_ISREG is set async offload (2022-07-24 18:39:18 -0600)
are available in the Git repository at:
git://git.kernel.dk/linux-block.git tags/for-5.20/io_uring-buffered-writes-2022-07-29
for you to fetch changes up to 0dd316ba8692c2374fbb82cce57c0b23144f2977:
mm: honor FGP_NOWAIT for page cache page allocation (2022-07-24 18:39:32 -0600)
----------------------------------------------------------------
for-5.20/io_uring-buffered-writes-2022-07-29
----------------------------------------------------------------
Jan Kara (3):
mm: Move starting of background writeback into the main balancing loop
mm: Move updates of dirty_exceeded into one place
mm: Add balance_dirty_pages_ratelimited_flags() function
Jens Axboe (2):
io_uring: fix issue with io_write() not always undoing sb_start_write()
mm: honor FGP_NOWAIT for page cache page allocation
Stefan Roesch (11):
iomap: Add flags parameter to iomap_page_create()
iomap: Add async buffered write support
iomap: Return -EAGAIN from iomap_write_iter()
fs: add a FMODE_BUF_WASYNC flags for f_mode
fs: add __remove_file_privs() with flags parameter
fs: Split off inode_needs_update_time and __file_update_time
fs: Add async write file modification handling.
io_uring: Add support for async buffered writes
io_uring: Add tracepoint for short writes
xfs: Specify lockmode when calling xfs_ilock_for_iomap()
xfs: Add async buffered write support
fs/inode.c | 168 +++++++++++++++++++++++++++++-----------
fs/iomap/buffered-io.c | 67 ++++++++++++----
fs/read_write.c | 4 +-
fs/xfs/xfs_file.c | 11 ++-
fs/xfs/xfs_iomap.c | 11 ++-
include/linux/fs.h | 4 +
include/linux/writeback.h | 7 ++
include/trace/events/io_uring.h | 25 ++++++
io_uring/rw.c | 41 ++++++++--
mm/filemap.c | 4 +
mm/page-writeback.c | 89 +++++++++++++--------
11 files changed, 323 insertions(+), 108 deletions(-)
--
Jens Axboe
next reply other threads:[~2022-07-31 15:03 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-07-31 15:03 Jens Axboe [this message]
2022-08-02 21:30 ` [GIT PULL] io_uring support for buffered writes pr-tracker-bot
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] \
/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