From: David Howells <dhowells@redhat.com>
To: Christian Brauner <christian@brauner.io>,
Steve French <smfrench@gmail.com>,
Matthew Wilcox <willy@infradead.org>
Cc: David Howells <dhowells@redhat.com>,
Jeff Layton <jlayton@kernel.org>,
Gao Xiang <hsiangkao@linux.alibaba.com>,
Dominique Martinet <asmadeus@codewreck.org>,
Marc Dionne <marc.dionne@auristor.com>,
Paulo Alcantara <pc@manguebit.com>,
Shyam Prasad N <sprasad@microsoft.com>,
Tom Talpey <tom@talpey.com>,
Eric Van Hensbergen <ericvh@kernel.org>,
Ilya Dryomov <idryomov@gmail.com>,
netfs@lists.linux.dev, linux-afs@lists.infradead.org,
linux-cifs@vger.kernel.org, linux-nfs@vger.kernel.org,
ceph-devel@vger.kernel.org, v9fs@lists.linux.dev,
linux-erofs@lists.ozlabs.org, linux-fsdevel@vger.kernel.org,
linux-mm@kvack.org, netdev@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: [PATCH 00/17] netfs, cifs: Miscellaneous fixes and read/write improvements
Date: Thu, 20 Jun 2024 18:31:18 +0100 [thread overview]
Message-ID: <20240620173137.610345-1-dhowells@redhat.com> (raw)
Hi Christian, Steve, Willy,
[!] NOTE: THE LAST PATCH IS INCOMPLETE AND ONLY PARTIALLY WORKS.
[!] Willy: Could you look at the sheaf-adding patch?
This set of patches includes some netfs and cifs fixes:
(1) Make sure we set the request length when doing an unbuffered/direct
write. This was in v2 of the io_uring fix writethrough patch, but v1
got merged instead.
(2) Move CIFS_INO_MODIFIED_ATTR to netfs_inode::flags to avoid jumping
through a function pointer just for that.
(3) Fix a premature issuing of write ops on a partially dirty page where
the dirty part is at the end of the page and thus may be contiguous
with the next page.
A couple of adjustments to the /proc/fs/netfs/stats file:
(4) All the netfs stats lines begin 'Netfs:'. Change this to something a
bit more useful.
(5) Add a couple of stats counters to track the numbers of skips and waits
on the per-inode writeback serialisation lock to make it easier to
check for this as a source of performance loss.
Some miscellaneous bits:
(6) Enable multipage folios in 9P.
(7) Reduce the number of conditional branches in netfs_perform_write().
(8) Delete some unused netfslib functions for dealing with xarrays.
(9) In cifs, defer read completion.
(10) In cifs, only pick a channel once per read request (as per v6.9) rather
than per-subrequest.
(11) In cifs, move the 'pid' from the subrequest to the request as it's the
same for all.
(12) Move the max_len/max_nr_segs members from netfs_io_subrequest to
netfs_io_request as they're only needed for one subreq at a time.
Then there's the main performance enhancing changes:
(13) Define a structure, struct sheaf, and a new iterator type, ITER_SHEAF, to
hold a buffer as a replacement for ITER_XARRAY. See that patch for
questions about naming and form.
(14) Use sheaves in the write-side helpers instead of xarrays.
(15) Simplify the write-side helpers to use sheaves to skip gaps rather than
trying to work out where gaps are.
(16) In afs, make the read subrequests asynchronous, putting them into work
items to allow the next patch to do progressive unlocking/reading.
(17) Overhaul the read-side helpers to improve performance. [!] NOTE: THIS IS
INCOMPLETE! It works for buffered read to a large extent, but not DIO
and may not cache correctly.
David
David Howells (17):
netfs: Fix io_uring based write-through
netfs, cifs: Move CIFS_INO_MODIFIED_ATTR to netfs_inode
netfs: Fix early issue of write op on partial write to folio tail
netfs: Adjust labels in /proc/fs/netfs/stats
netfs: Record contention stats for writeback lock
9p: Enable multipage folios
netfs: Reduce number of conditional branches in netfs_perform_write()
netfs: Delete some xarray-wangling functions that aren't used
cifs: Defer read completion
cifs: Only pick a channel once per read request
cifs: Move the 'pid' from the subreq to the req
netfs: Move max_len/max_nr_segs from netfs_io_subrequest to
netfs_io_stream
mm: Define struct sheaf and ITER_SHEAF to handle a sequence of folios
netfs: Use new sheaf data type and iterator instead of xarray iter
netfs: Simplify the writeback code
afs: Make read subreqs async
netfs: Speed up buffered reading
fs/9p/vfs_addr.c | 13 +-
fs/9p/vfs_inode.c | 1 +
fs/afs/file.c | 21 +-
fs/afs/fsclient.c | 9 +-
fs/afs/write.c | 4 +-
fs/afs/yfsclient.c | 9 +-
fs/cachefiles/io.c | 5 +-
fs/ceph/addr.c | 72 ++---
fs/netfs/Makefile | 2 +-
fs/netfs/buffered_read.c | 510 +++++++++++++++++++++------------
fs/netfs/buffered_write.c | 308 ++++++++++----------
fs/netfs/direct_read.c | 99 ++++++-
fs/netfs/direct_write.c | 3 +-
fs/netfs/internal.h | 26 +-
fs/netfs/io.c | 528 +----------------------------------
fs/netfs/iterator.c | 50 ++++
fs/netfs/main.c | 7 +-
fs/netfs/misc.c | 115 ++++----
fs/netfs/objects.c | 2 +-
fs/netfs/read_collect.c | 450 +++++++++++++++++++++++++++++
fs/netfs/stats.c | 23 +-
fs/netfs/write_collect.c | 242 +++++-----------
fs/netfs/write_issue.c | 68 ++---
fs/nfs/fscache.c | 31 +-
fs/nfs/fscache.h | 7 +-
fs/smb/client/cifsglob.h | 4 +-
fs/smb/client/cifssmb.c | 14 +-
fs/smb/client/file.c | 109 +++-----
fs/smb/client/smb2pdu.c | 21 +-
include/linux/iov_iter.h | 57 ++++
include/linux/netfs.h | 29 +-
include/linux/sheaf.h | 83 ++++++
include/linux/uio.h | 11 +
include/trace/events/netfs.h | 124 +++++---
lib/iov_iter.c | 222 ++++++++++++++-
lib/kunit_iov_iter.c | 259 +++++++++++++++++
lib/scatterlist.c | 69 ++++-
37 files changed, 2251 insertions(+), 1356 deletions(-)
create mode 100644 fs/netfs/read_collect.c
create mode 100644 include/linux/sheaf.h
next reply other threads:[~2024-06-20 17:32 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-06-20 17:31 David Howells [this message]
2024-06-20 17:31 ` [PATCH 01/17] netfs: Fix io_uring based write-through David Howells
2024-06-20 17:31 ` [PATCH 02/17] netfs, cifs: Move CIFS_INO_MODIFIED_ATTR to netfs_inode David Howells
2024-06-20 17:31 ` [PATCH 03/17] netfs: Fix early issue of write op on partial write to folio tail David Howells
2024-06-20 17:31 ` [PATCH 04/17] netfs: Adjust labels in /proc/fs/netfs/stats David Howells
2024-06-20 17:31 ` [PATCH 05/17] netfs: Record contention stats for writeback lock David Howells
2024-06-20 17:31 ` [PATCH 06/17] 9p: Enable multipage folios David Howells
2024-06-20 20:34 ` Dominique Martinet
2024-06-20 20:49 ` Dominique Martinet
2024-06-20 17:31 ` [PATCH 07/17] netfs: Reduce number of conditional branches in netfs_perform_write() David Howells
2024-06-20 17:31 ` [PATCH 08/17] netfs: Delete some xarray-wangling functions that aren't used David Howells
2024-06-20 17:31 ` [PATCH 09/17] cifs: Defer read completion David Howells
2024-06-20 17:31 ` [PATCH 10/17] cifs: Only pick a channel once per read request David Howells
2024-06-20 17:31 ` [PATCH 11/17] cifs: Move the 'pid' from the subreq to the req David Howells
2024-06-20 20:29 ` Steve French
2024-06-20 17:31 ` [PATCH 12/17] netfs: Move max_len/max_nr_segs from netfs_io_subrequest to netfs_io_stream David Howells
2024-06-20 17:31 ` [PATCH 13/17] mm: Define struct sheaf and ITER_SHEAF to handle a sequence of folios David Howells
2024-06-20 17:31 ` [PATCH 14/17] netfs: Use new sheaf data type and iterator instead of xarray iter David Howells
2024-06-20 17:31 ` [PATCH 15/17] netfs: Simplify the writeback code David Howells
2024-06-20 17:31 ` [PATCH 16/17] afs: Make read subreqs async David Howells
2024-06-20 17:31 ` [PATCH 17/17] netfs: Speed up buffered reading David Howells
2024-06-20 19:30 ` [PATCH v2 09/17] cifs: Defer read completion David Howells
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 \
--in-reply-to=20240620173137.610345-1-dhowells@redhat.com \
--to=dhowells@redhat.com \
--cc=asmadeus@codewreck.org \
--cc=ceph-devel@vger.kernel.org \
--cc=christian@brauner.io \
--cc=ericvh@kernel.org \
--cc=hsiangkao@linux.alibaba.com \
--cc=idryomov@gmail.com \
--cc=jlayton@kernel.org \
--cc=linux-afs@lists.infradead.org \
--cc=linux-cifs@vger.kernel.org \
--cc=linux-erofs@lists.ozlabs.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=linux-nfs@vger.kernel.org \
--cc=marc.dionne@auristor.com \
--cc=netdev@vger.kernel.org \
--cc=netfs@lists.linux.dev \
--cc=pc@manguebit.com \
--cc=smfrench@gmail.com \
--cc=sprasad@microsoft.com \
--cc=tom@talpey.com \
--cc=v9fs@lists.linux.dev \
--cc=willy@infradead.org \
/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;
as well as URLs for NNTP newsgroup(s).