From patchwork Thu Mar 30 18:27:09 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tim Gardner X-Patchwork-Id: 1763394 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.ubuntu.com (client-ip=91.189.94.19; helo=huckleberry.canonical.com; envelope-from=kernel-team-bounces@lists.ubuntu.com; receiver=) Authentication-Results: legolas.ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=canonical.com header.i=@canonical.com header.a=rsa-sha256 header.s=20210705 header.b=KUMbjSz/; dkim-atps=neutral Received: from huckleberry.canonical.com (huckleberry.canonical.com [91.189.94.19]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4PnX2l0d6bz1yZ0 for ; Fri, 31 Mar 2023 05:27:26 +1100 (AEDT) Received: from localhost ([127.0.0.1] helo=huckleberry.canonical.com) by huckleberry.canonical.com with esmtp (Exim 4.86_2) (envelope-from ) id 1phwzY-0003LW-KK; Thu, 30 Mar 2023 18:27:20 +0000 Received: from smtp-relay-internal-0.internal ([10.131.114.225] helo=smtp-relay-internal-0.canonical.com) by huckleberry.canonical.com with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.86_2) (envelope-from ) id 1phwzV-0003KY-LN for kernel-team@lists.ubuntu.com; Thu, 30 Mar 2023 18:27:17 +0000 Received: from mail-pj1-f70.google.com (mail-pj1-f70.google.com [209.85.216.70]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by smtp-relay-internal-0.canonical.com (Postfix) with ESMTPS id 606DF3F236 for ; Thu, 30 Mar 2023 18:27:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=canonical.com; s=20210705; t=1680200837; bh=B/Y5o5YcQPli323bUBbz2aGavoLcqXqrZhjvq1VGh10=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=KUMbjSz/Uvi0k4WGhOoqNwNffckp5L5L/HZIPZuESYDcD9LGe2w7xShM3UzedzBoV DqMc1707AJW5OXTKFQD1L5kjEt0YoTBguuJIIwoXpkeZvQSHJg25yeDckgRJ5dKX5u 7wOGPGeVf5YOmbHXTQnbNAgfgZfQmGre71FVbOUYfVUSLIrITvRe4c1VaxZeNxO2hv HE/YsRmKyj3pRLxk48tlvZiKqWZvfoKSH/GDJNLEj7CgMjs4bg6Df3ofxk6MkooiSe +LvHjBKwH6FqdVCwauRxkLY8fLKSkl3NrTAYMj6fRmDtxX81BHTYNCDiRRfe27URl+ QfkZLEHTPVR/w== Received: by mail-pj1-f70.google.com with SMTP id gj9-20020a17090b108900b0024038c818a0so6204893pjb.7 for ; Thu, 30 Mar 2023 11:27:17 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1680200835; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=B/Y5o5YcQPli323bUBbz2aGavoLcqXqrZhjvq1VGh10=; b=r3sWxh4urSlhfsKxJUYG9MSzx5/2Z1ReryF6r40vWPq3vjm6HBQLtXmYGD9LZ9q6Ou 5yAkgYWvP96VSz5VaIUBvhMxeQpvL12s+gHkuWWwCshuCviVLbpLqHPz8k0WxEvWaOQO ngEhwOEFvonJbdl01xs1Ptw34th0coyTO6ZSQ56z1mXwEcYVrtfF3uJj0oZ2sRiqbeiR +BZN75jiFU9aaoJfAAJZVCSWzBfjHM0VFCtzl5NTbpEUPEoJcgSHM1VumlfC/qPYvKhf vhQXJUBYla6eBFPIP2A5jpqFXVcKF+geplz/i++rfZiws0DFGOZMBMiNe3dMKXx0d1qX zc+Q== X-Gm-Message-State: AO0yUKVa25vG3Tf5shZ1jp27ZNb3tf+2WgU56YbtvPAptzPS62a0Dtk+ CBJlVg1F1fX63ndwh16VHIAeBJ0BiG0idxxyAkZmMWV6NQx/0bsoes+cLgNVLIKZS1unmL8oTPN sDp7QwXF7XgnOpdJ81M9iKAjMIIyKBpWmigWnF9FpM5/XnhBN1A== X-Received: by 2002:a05:6a20:af1c:b0:d9:3683:bc15 with SMTP id dr28-20020a056a20af1c00b000d93683bc15mr19799406pzb.19.1680200835650; Thu, 30 Mar 2023 11:27:15 -0700 (PDT) X-Google-Smtp-Source: AK7set/JF9DYTiOnL+gFDkA2JzPl5+/APl2g30/nTuAYBBBEi339z0ZZ/Q/hzA2YT6Z3yX8LrPyyKg== X-Received: by 2002:a05:6a20:af1c:b0:d9:3683:bc15 with SMTP id dr28-20020a056a20af1c00b000d93683bc15mr19799388pzb.19.1680200835367; Thu, 30 Mar 2023 11:27:15 -0700 (PDT) Received: from smtp.gmail.com ([69.163.84.166]) by smtp.gmail.com with ESMTPSA id d19-20020aa78e53000000b005d61829db4fsm179375pfr.168.2023.03.30.11.27.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 30 Mar 2023 11:27:15 -0700 (PDT) From: Tim Gardner To: kernel-team@lists.ubuntu.com Subject: [PATCH 2/3] smb3: lower default deferred close timeout to address perf regression Date: Thu, 30 Mar 2023 12:27:09 -0600 Message-Id: <20230330182710.1141816-3-tim.gardner@canonical.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230330182710.1141816-1-tim.gardner@canonical.com> References: <20230330182710.1141816-1-tim.gardner@canonical.com> MIME-Version: 1.0 X-BeenThere: kernel-team@lists.ubuntu.com X-Mailman-Version: 2.1.20 Precedence: list List-Id: Kernel team discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: kernel-team-bounces@lists.ubuntu.com Sender: "kernel-team" From: Steve French BugLink: https://bugs.launchpad.net/bugs/2013349 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 Reported-by: kernel test robot Link: https://lore.kernel.org/lkml/997614df-10d4-af53-9571-edec36b0e2f3@intel.com/ Fixes: 5efdd9122eff ("smb3: allow deferred close timeout to be configurable") Cc: stable@vger.kernel.org # 6.0+ Tested-by: Yin Fengwei Reviewed-by: Paulo Alcantara (SUSE) Reviewed-by: Shyam Prasad N Signed-off-by: Steve French (cherry picked from commit 7e0e76d99079be13c9961dde7c93b2d1ee665af4) Signed-off-by: Tim Gardner --- 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 bbaee4c2281f..a268896d05d5 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