This is a note to let you know that I've just added the patch titled smb3: lower default deferred close timeout to address perf regression to the 6.1-stable tree which can be found at: http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary The filename of the patch is: smb3-lower-default-deferred-close-timeout-to-address-perf-regression.patch and it can be found in the queue-6.1 subdirectory. If you, or anyone else, feels it should not be added to the stable tree, please let <stable@xxxxxxxxxxxxxxx> know about it. >From 7e0e76d99079be13c9961dde7c93b2d1ee665af4 Mon Sep 17 00:00:00 2001 From: Steve French <stfrench@xxxxxxxxxxxxx> Date: Thu, 23 Mar 2023 15:10:26 -0500 Subject: smb3: lower default deferred close timeout to address perf regression From: Steve French <stfrench@xxxxxxxxxxxxx> commit 7e0e76d99079be13c9961dde7c93b2d1ee665af4 upstream. Performance tests with large number of threads noted that the change of the default closetimeo (deferred close timeout between when close is done by application and when client has to send the close to the server), to 5 seconds from 1 second, significantly degraded perf in some cases like this (in the filebench example reported, the stats show close requests on the wire taking twice as long, and 50% regression in filebench perf). This is stil configurable via mount parm closetimeo, but to be safe, decrease default back to its previous value of 1 second. Reported-by: Yin Fengwei <fengwei.yin@xxxxxxxxx> Reported-by: kernel test robot <yujie.liu@xxxxxxxxx> Link: https://lore.kernel.org/lkml/997614df-10d4-af53-9571-edec36b0e2f3@xxxxxxxxx/ Fixes: 5efdd9122eff ("smb3: allow deferred close timeout to be configurable") Cc: stable@xxxxxxxxxxxxxxx # 6.0+ Tested-by: Yin Fengwei <fengwei.yin@xxxxxxxxx> Reviewed-by: Paulo Alcantara (SUSE) <pc@xxxxxxxxxxxxx> Reviewed-by: Shyam Prasad N <sprasad@xxxxxxxxxxxxx> Signed-off-by: Steve French <stfrench@xxxxxxxxxxxxx> Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx> --- fs/cifs/fs_context.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/cifs/fs_context.h b/fs/cifs/fs_context.h index 1b8d4e27f831..3de00e7127ec 100644 --- a/fs/cifs/fs_context.h +++ b/fs/cifs/fs_context.h @@ -286,5 +286,5 @@ extern void smb3_update_mnt_flags(struct cifs_sb_info *cifs_sb); * max deferred close timeout (jiffies) - 2^30 */ #define SMB3_MAX_DCLOSETIMEO (1 << 30) -#define SMB3_DEF_DCLOSETIMEO (5 * HZ) /* Can increase later, other clients use larger */ +#define SMB3_DEF_DCLOSETIMEO (1 * HZ) /* even 1 sec enough to help eg open/write/close/open/read */ #endif -- 2.40.0 Patches currently in stable-queue which might be from stfrench@xxxxxxxxxxxxx are queue-6.1/smb3-lower-default-deferred-close-timeout-to-address-perf-regression.patch queue-6.1/smb3-fix-unusable-share-after-force-unmount-failure.patch queue-6.1/ksmbd-add-low-bound-validation-to-fsctl_query_alloca.patch queue-6.1/ksmbd-fix-possible-refcount-leak-in-smb2_open.patch queue-6.1/ksmbd-add-low-bound-validation-to-fsctl_set_zero_dat.patch