diff --git a/patches.suse/NFS-Fix-direct-WRITE-throughput-regression.patch b/patches.suse/NFS-Fix-direct-WRITE-throughput-regression.patch new file mode 100644 index 0000000..8106ee5 --- /dev/null +++ b/patches.suse/NFS-Fix-direct-WRITE-throughput-regression.patch @@ -0,0 +1,44 @@ +From: Chuck Lever +Date: Fri, 29 May 2020 14:14:40 -0400 +Subject: [PATCH] NFS: Fix direct WRITE throughput regression +Git-commit: ba838a75e73f55a780f1ee896b8e3ecb032dba0f +Patch-mainline: v5.8 +References: git-fixes + +I measured a 50% throughput regression for large direct writes. + +The observed on-the-wire behavior is that the client sends every +NFS WRITE twice: once as an UNSTABLE WRITE plus a COMMIT, and once +as a FILE_SYNC WRITE. + +This is because the nfs_write_match_verf() check in +nfs_direct_commit_complete() fails for every WRITE. + +Buffered writes use nfs_write_completion(), which sets req->wb_verf +correctly. Direct writes use nfs_direct_write_completion(), which +does not set req->wb_verf at all. This leaves req->wb_verf set to +all zeroes for every direct WRITE, and thus +nfs_direct_commit_completion() always sets NFS_ODIRECT_RESCHED_WRITES. + +This fix appears to restore nearly all of the lost performance. + +Fixes: 1f28476dcb98 ("NFS: Fix O_DIRECT commit verifier handling") +Signed-off-by: Chuck Lever +Signed-off-by: Anna Schumaker +Acked-by: NeilBrown + +--- + fs/nfs/direct.c | 2 ++ + 1 file changed, 2 insertions(+) + +--- a/fs/nfs/direct.c ++++ b/fs/nfs/direct.c +@@ -771,6 +771,8 @@ static void nfs_direct_write_completion( + nfs_list_remove_request(req); + if (request_commit) { + kref_get(&req->wb_kref); ++ memcpy(&req->wb_verf, &hdr->verf.verifier, ++ sizeof(req->wb_verf)); + nfs_mark_request_commit(req, hdr->lseg, &cinfo, + hdr->ds_commit_idx); + } diff --git a/series.conf b/series.conf index d2cffa2..30c91d9 100644 --- a/series.conf +++ b/series.conf @@ -57446,6 +57446,7 @@ patches.suse/nfsd-Fix-svc_xprt-refcnt-leak-when-setup-callback-cl.patch patches.suse/crypto-cavium-nitrox-Fix-nitrox_get_first_device-whe.patch patches.suse/net-sunrpc-Fix-off-by-one-issues-in-rpc_ntop6.patch + patches.suse/NFS-Fix-direct-WRITE-throughput-regression.patch patches.suse/drm-sun4i-hdmi-ddc-clk-Fix-size-of-m-divider.patch patches.suse/ALSA-usb-audio-Fix-inconsistent-card-PM-state-after-.patch patches.suse/ALSA-usb-audio-Add-vendor-product-and-profile-name-f.patch