From: Dave Wysochanski <dwysocha@redhat.com>
To: Anna Schumaker <anna.schumaker@netapp.com>,
Trond Myklebust <trond.myklebust@hammerspace.com>,
David Howells <dhowells@redhat.com>
Cc: linux-nfs@vger.kernel.org, linux-cachefs@redhat.com,
Benjamin Maynard <benmaynard@google.com>,
Daire Byrne <daire.byrne@gmail.com>
Subject: [RFC PATCH 0/3] Convert NFS to the new netfs API
Date: Wed, 24 Aug 2022 05:34:58 -0400 [thread overview]
Message-ID: <20220824093501.384755-1-dwysocha@redhat.com> (raw)
This patchset converts NFS non-direct READ IO paths to unconditionally
use the netfs API with a non-invasive approach. The existing NFS pgio
layer does not need extensive changes, and is the best way so far I've
found to avoid Trond's earlier objection [1]. I have not yet attempted
performance comparisions to address Chuck Lever's concern [2].
The main patch to be reviewed is patch #3 which converts nfs_read_folio
and nfs_readahead.
I do not really like this patchset but so far this is what I was able
to come up with the move things forward. I think it is awkward and
still needs work, has some issues (below) though it is fairly stable
by running xfstests generic with various servers. The known issues
are as follows:
1. Unit test setting rsize < readahead does not properly read from
fscache but re-reads data from the NFS server
* This will be fixed once another linux-cachefs [3] patch to resolve
"Stop read optimisation when folio removed from pagecache"
2. "Cache volume key already in use" after xfstest runs
* xfstests (hammerspace with vers=4.2,fsc) shows the following on the
console after some tests:
"NFS: Cache volume key already in use (nfs,4.1,2,c50,cfe0100a,3,,,8000,100000,100000,bb8,ea60,7530,ea60,1)"
* This may be fixed with another patch [4] that is in progress
3. Occasional process IO hangs in read paths
* May be due to out-of-order RPC replies or something unique to NetApp
triggering a bug in the conversion patch
* xfstests (Example: generic/075 with netapp ontap9 vers=4.1)
* Sample backtrace
#2 [ffff888104967990] io_schedule at ffffffffbc46969d
#3 [ffff8881049679b0] folio_wait_bit_common at ffffffffbb40214b
#4 [ffff888104967ad0] filemap_get_pages at ffffffffbb40688c
#5 [ffff888104967c00] filemap_read at ffffffffbb406a61
#6 [ffff888104967d80] nfs_file_read at ffffffffc0e0f415 [nfs]
#7 [ffff888104967db0] vfs_read at ffffffffbb5681a5
4. Data corruption seen with unit test where rsize < readahead
* Seen with vanilla 6.0-rc2 (did not occur on 5.19); likely unrelated
to this patchset
mount -o vers=4.2,fsc,rsize=8192 127.0.0.1:/export /mnt
dd if=/dev/urandom of=/tmp/integrity-rsize-file1.bin bs=16k count=1
./nfs-readahead.sh set /mnt 16384
dd if=/tmp/integrity-rsize-file1.bin of=/mnt/integrity-rsize-file1.bin bs=16k count=1
echo 3 > /proc/sys/vm/drop_caches
md5sum /mnt/integrity-rsize-file1.bin /tmp/integrity-rsize-file1.bin
md5sums don't match, MD5_NFS = 00eaf1a5bc1b3dfd54711db551619afa != MD5_LOCAL = e8d835c83ba1f1264869dc40673fa20c
The patchset is based on 6.0-rc2 and has been pushed to github at:
https://github.com/DaveWysochanskiRH/kernel/commits/nfs-fscache-netfs
[1] https://lore.kernel.org/linux-nfs/9cfd5bc3cfc6abc2d3316b0387222e708d67f595.camel@hammerspace.com/
[2] https://marc.info/?l=linux-nfs&m=160597917525083&w=4
[3] https://www.mail-archive.com/linux-cachefs@redhat.com/msg03043.html
[4] https://marc.info/?l=linux-nfs&m=165962662200679&w=4
Dave Wysochanski (3):
NFS: Rename readpage_async_filler to nfs_pageio_add_page
NFS: Add support for netfs in struct nfs_inode and Kconfig
NFS: Convert nfs_read_folio and nfs_readahead to netfs APIs
fs/nfs/Kconfig | 1 +
fs/nfs/delegation.c | 2 +-
fs/nfs/dir.c | 2 +-
fs/nfs/fscache.c | 191 ++++++++++++++++++---------------------
fs/nfs/fscache.h | 77 ++++++++--------
fs/nfs/inode.c | 8 +-
fs/nfs/internal.h | 10 +-
fs/nfs/pagelist.c | 14 +++
fs/nfs/pnfs.c | 12 +--
fs/nfs/read.c | 117 ++++++++----------------
fs/nfs/write.c | 2 +-
include/linux/nfs_fs.h | 19 +---
include/linux/nfs_page.h | 1 +
include/linux/nfs_xdr.h | 1 +
14 files changed, 210 insertions(+), 247 deletions(-)
--
2.31.1
next reply other threads:[~2022-08-24 9:35 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-08-24 9:34 Dave Wysochanski [this message]
2022-08-24 9:34 ` [RFC PATCH 1/3] NFS: Rename readpage_async_filler to nfs_pageio_add_page Dave Wysochanski
2022-08-24 9:35 ` [RFC PATCH 2/3] NFS: Add support for netfs in struct nfs_inode and Kconfig Dave Wysochanski
2022-08-24 12:42 ` Trond Myklebust
2022-08-24 13:00 ` David Wysochanski
2022-08-24 13:05 ` Trond Myklebust
2022-08-24 14:12 ` David Howells
2022-08-24 16:27 ` Trond Myklebust
2022-08-24 16:53 ` Matthew Wilcox
2022-08-24 17:43 ` Trond Myklebust
2022-08-25 15:01 ` Matthew Wilcox
2022-08-25 15:30 ` David Howells
2022-08-25 15:32 ` Trond Myklebust
2022-08-25 17:53 ` Matthew Wilcox
2022-08-25 15:20 ` David Howells
2022-08-24 9:35 ` [RFC PATCH 3/3] NFS: Convert nfs_read_folio and nfs_readahead to netfs APIs Dave Wysochanski
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=20220824093501.384755-1-dwysocha@redhat.com \
--to=dwysocha@redhat.com \
--cc=anna.schumaker@netapp.com \
--cc=benmaynard@google.com \
--cc=daire.byrne@gmail.com \
--cc=dhowells@redhat.com \
--cc=linux-cachefs@redhat.com \
--cc=linux-nfs@vger.kernel.org \
--cc=trond.myklebust@hammerspace.com \
/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 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.