All of lore.kernel.org
 help / color / mirror / Atom feed
* [GIT PULL] io_uring support for buffered writes
@ 2022-07-31 15:03 Jens Axboe
  2022-08-02 21:30 ` pr-tracker-bot
  0 siblings, 1 reply; 2+ messages in thread
From: Jens Axboe @ 2022-07-31 15:03 UTC (permalink / raw)
  To: Linus Torvalds; +Cc: io-uring, linux-xfs, LKML

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


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

* Re: [GIT PULL] io_uring support for buffered writes
  2022-07-31 15:03 [GIT PULL] io_uring support for buffered writes Jens Axboe
@ 2022-08-02 21:30 ` pr-tracker-bot
  0 siblings, 0 replies; 2+ messages in thread
From: pr-tracker-bot @ 2022-08-02 21:30 UTC (permalink / raw)
  To: Jens Axboe; +Cc: Linus Torvalds, io-uring, linux-xfs, LKML

The pull request you sent on Sun, 31 Jul 2022 09:03:30 -0600:

> git://git.kernel.dk/linux-block.git tags/for-5.20/io_uring-buffered-writes-2022-07-29

has been merged into torvalds/linux.git:
https://git.kernel.org/torvalds/c/98e247464088a11ce2328a214fdb87d4c06f8db6

Thank you!

-- 
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/prtracker.html

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

end of thread, other threads:[~2022-08-02 21:30 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-07-31 15:03 [GIT PULL] io_uring support for buffered writes Jens Axboe
2022-08-02 21:30 ` pr-tracker-bot

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.