The VFS layer holds the inode semaphor when calling file systems to perform direct reads and writes, as it assumes the calls only schedule the I/O, but do not wait for it. The NFS client O_DIRECT support is entirely synchronous, so holding the inode semaphor effectively serializes all direct I/O against a file. This patch changes the NFS direct I/O implementation to release the inode semaphor during direct read and write operations, allowing multiple concurrent direct I/O requests against NFS files.
direct.c | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-)
The call_encode state in the RPC client's FSM clears the task's RPC buffer before setting up the RPC header and XDR-encoding the NFS operation. This is expensive and unnecessary. This patch removes the logic to clear the buffer, and fixes up the unx_marshal function, which appears to assume the buffer is pre-zeroed.
auth_unix.c | 12 ++++-------- clnt.c | 3 --- 2 files changed, 4 insertions(+), 11 deletions(-)
This patch introduces two new tunable sysctl parameters that control how large each mount point's RPC slot table is. This allows a system administrator to increase or decrease the maximum allowable NFS I/O concurrency on each mount point.
fs/nfs/inode.c | 5 +---- include/linux/sunrpc/debug.h | 2 ++ include/linux/sunrpc/xprt.h | 22 ++++++++++++---------- net/sunrpc/sunrpc_syms.c | 2 ++ net/sunrpc/sysctl.c | 28 +++++++++++++++++++++++++++- net/sunrpc/xprt.c | 34 +++++++++++++++++++++++----------- 6 files changed, 67 insertions(+), 26 deletions(-)
This patch relocates a common bit of read RPC setup logic from version-specific proc methods to the mainline read path, and prepares the nfs_read_rpcsetup API to handle asynchronous reads when rsize is smaller than a page.
fs/nfs/nfs3proc.c | 15 +------------- fs/nfs/nfs4proc.c | 10 --------- fs/nfs/proc.c | 15 +------------- fs/nfs/read.c | 50 +++++++++++++++++++++++++++++------------------- include/linux/nfs_xdr.h | 2 - 5 files changed, 37 insertions(+), 55 deletions(-)
This patch relocates a common bit of write RPC setup logic from version-specific proc methods to the mainline write path, and prepares the nfs_write_rpcsetup API to handle asynchronous writes when wsize is smaller than a page.
fs/nfs/nfs3proc.c | 13 ------------ fs/nfs/nfs4proc.c | 12 +---------- fs/nfs/proc.c | 13 ------------ fs/nfs/write.c | 49 +++++++++++++++++++++++++++++------------------- include/linux/nfs_xdr.h | 2 - 5 files changed, 35 insertions(+), 54 deletions(-)
This patch relocates a common bit of commit RPC setup logic from version-specific proc methods to the mainline commit path, echoing similar changes to the read and write paths.
fs/nfs/nfs3proc.c | 9 +-------- fs/nfs/nfs4proc.c | 9 +-------- fs/nfs/proc.c | 2 +- fs/nfs/write.c | 11 +++++++++-- include/linux/nfs_xdr.h | 2 +- 5 files changed, 13 insertions(+), 20 deletions(-)
This patch extracts functionality that will be used by both the path that generates multiple small requests to read in a page, and the path that generates one request to read in one or more pages.
read.c | 25 +++++++++++++++++-------- 1 files changed, 17 insertions(+), 8 deletions(-)
This patch extracts functionality that will be used by both the path that generates multiple small requests to flush out a page, and the path that generates one request to flush out one or more pages.
write.c | 30 +++++++++++++++--------------- 1 files changed, 15 insertions(+), 15 deletions(-)
This patch introduces changes to the nfs_page, nfs_read_data, and nfs_write_data structures required to support asynchronous reads and writes when rsize or wsize is smaller than the client's page size.
fs/nfs/pagelist.c | 1 + include/linux/nfs_page.h | 39 +++++++++++++++++++++++++++++++++++++++ include/linux/nfs_xdr.h | 4 ++++ 3 files changed, 44 insertions(+)
This patch extracts functionality that will be used by both the path that generates multiple small requests to read in a page, and the path that generates one request to read in one or more pages.
read.c | 36 +++++++++++++++++++----------------- 1 files changed, 19 insertions(+), 17 deletions(-)
This patch adds functionality that will be used by the path that generates multiple small requests to flush out a page.
write.c | 22 ++++++++++++++++++++++ 1 files changed, 22 insertions(+)
This patch introduces several new functions that implement the path that generates multiple small requests to read in a page.
read.c | 125 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 125 insertions(+)
This patch hooks in the new functions to enable the path that generates multiple small requests to read in a page.
read.c | 63 ++++++++++++++++++++++++++++++++++++--------------------------- 1 files changed, 36 insertions(+), 27 deletions(-)
This patch introduces several new functions that implement the path that generates multiple small requests to flush out a page.
write.c | 212 ++++++++++++++++++++++++++++++++++++++++++++++++++-------------- 1 files changed, 166 insertions(+), 46 deletions(-)
This patch hooks in the new functions to enable the path that generates multiple small requests to flush out a page.
write.c | 16 +++++++++------- 1 files changed, 9 insertions(+), 7 deletions(-)
A "short read" occurs if the server returns fewer bytes than the client requested. Short reads often happen at the end of a file where the client requests a full page, and the file ends in the middle of the page. However, if a short read should occurs in a page that resides the middle of a file, this is an error. This patch adds logic to set the PageError bit on the page being read if the client detects short reads in the middle of a file.
read.c | 5 ++++- 1 files changed, 4 insertions(+), 1 deletion(-)
All of the above patches rolled into one.
fs/nfs/direct.c | 6 fs/nfs/inode.c | 5 fs/nfs/nfs3proc.c | 37 ---- fs/nfs/nfs4proc.c | 31 --- fs/nfs/pagelist.c | 1 fs/nfs/proc.c | 30 --- fs/nfs/read.c | 304 +++++++++++++++++++++++++++++--------- fs/nfs/write.c | 339 +++++++++++++++++++++++++++++++------------ include/linux/nfs_page.h | 39 ++++ include/linux/nfs_xdr.h | 10 - include/linux/sunrpc/debug.h | 2 include/linux/sunrpc/xprt.h | 22 +- net/sunrpc/auth_unix.c | 12 - net/sunrpc/clnt.c | 3 net/sunrpc/sunrpc_syms.c | 2 net/sunrpc/sysctl.c | 28 +++ net/sunrpc/xprt.c | 34 ++-- 17 files changed, 615 insertions(+), 290 deletions(-)
Last modified: Fri Feb 20 23:48:28 EST 2004