Received: by 2002:a05:7412:37c9:b0:e2:908c:2ebd with SMTP id jz9csp832748rdb; Tue, 19 Sep 2023 11:25:09 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFCpPdMwNpBwXeJ+grHioWUY0Q0WN9uYMtqBvfS9SEZfdd1Hm18c/pL8lhfImQDgPOzHtsn X-Received: by 2002:a17:90a:bf0b:b0:263:fbe5:2125 with SMTP id c11-20020a17090abf0b00b00263fbe52125mr519884pjs.15.1695147908681; Tue, 19 Sep 2023 11:25:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1695147908; cv=none; d=google.com; s=arc-20160816; b=iV4TKVVHHJ8I27KijCP9WB/KIPSk34ve1+nk0Dhm1l8A6c0Ah6g8z5DOJm6vFTxhrP D/5sKgxM6OHo2hn9DLnCr3SfTTQxzGgfH6D3ht0aFZxMXLs1ERkDdwz99PUYberuNTEW yxNIzb95756vaXtA/LRaTu/5V2PLi+VqOxzcKCfUNtmBnoGruZYGpAK0Kflb1smq7Gqu f0hSPjjX2MrF4vtbdpqkZJ5iNtI56v0v4hXnEqdMJxU864ypNBHTvAN0vlPCG/CqaXZ/ +CjdW/d/UlUCoqYROwDpRH8Re3YFyWy+sT0jsIg3b6d0AdNfaQ3qfb/dL1NLrNjYzXDt K9Yg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=nwdzojJepsaJdah6ocqUuoQIoGD1sEl1BnvEuQsR990=; fh=AllXfc9saGLKKHPdDxSctwj9/25RaCo4vLm1BVIoSsQ=; b=W+BDeSSx/zflybJwh4BbXo30+WcQ3J9OXc3f4q1QNjAmNuXEm3pFYpN2SxWLoKZ4f4 o9bBr4sjoHMQjjSMuyVwlB/l4JclHCkB3Q86lw0CuF9WuwOXQjKmYdZbWCu7j0ePxc73 eipieASooRe9om1aUc5Hixb/0FECXEQ/tJA2g/aWTM4I6EDa2shlnEUCtgNuP5LytILC 1wj5TP+Q7CGi19xnkPeVU3oFzp50a8cxysj2Sa8NGOXqwVRRcr2jUddIT2C/9DoEWFRl R6FBsUqhL6rePxNqChiKvn0IYfUOV4Qt7iZchTm9wda+ljnMIX7vUkOKMMGmwUQfw4Ta Ljjg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=lmDUWyV1; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.36 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from pete.vger.email (pete.vger.email. [23.128.96.36]) by mx.google.com with ESMTPS id l5-20020a17090a850500b00274cd892b39si5696400pjn.132.2023.09.19.11.25.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 19 Sep 2023 11:25:08 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.36 as permitted sender) client-ip=23.128.96.36; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=lmDUWyV1; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.36 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by pete.vger.email (Postfix) with ESMTP id 1CC678229D2D; Tue, 19 Sep 2023 11:24:11 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at pete.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232276AbjISSYF (ORCPT + 99 others); Tue, 19 Sep 2023 14:24:05 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36226 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229853AbjISSYD (ORCPT ); Tue, 19 Sep 2023 14:24:03 -0400 Received: from mail-lf1-x12a.google.com (mail-lf1-x12a.google.com [IPv6:2a00:1450:4864:20::12a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E78378F; Tue, 19 Sep 2023 11:23:57 -0700 (PDT) Received: by mail-lf1-x12a.google.com with SMTP id 2adb3069b0e04-502153ae36cso9731232e87.3; Tue, 19 Sep 2023 11:23:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1695147836; x=1695752636; darn=vger.kernel.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=nwdzojJepsaJdah6ocqUuoQIoGD1sEl1BnvEuQsR990=; b=lmDUWyV180yTarYyqkD+KocaH+jqK59jvlsZONl5T10vmVuwH2QSXmEWwUKlURDd5R Dmv2CXyin2OLsRB+fYqcZZ/ge0tFIg197L+ylXVoSEiS05vhyVa1Wrk8g3bgfJ98jncy WpSDZBXiCHRKdeKQk5iH9bhwj8yjZLYjIy7k37H7cKGTOYdtYX4h/U9dk6ZG5Rvb0LrY ntDUFv4XEIOiqHQJ7eVM4UGd78qh8JycITqhcz5C0PizCaiB0RD87rOHL/51YRT9Pplx 3RhNfkvBnnvpC309jf44tSdr/MADSp6JZL7FQpCKklBldq3WHdOiwCzcDfY/J3POw1dD /zAA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1695147836; x=1695752636; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=nwdzojJepsaJdah6ocqUuoQIoGD1sEl1BnvEuQsR990=; b=fEnE31PbeZgTTwupG5vbZ5i7lCBCGQwoyM65UA01WMw1MCzbgs2tQIHF4Yy7ngh8KR E7nQRggh+Jzc4MyMWuzmzu4E0PInK5bHZjJvjZJ/VHSoqO4nSlCmHoQ+kq9QW8YvZmsz vcT1/tSzHPsLmEe2S8Ps9U70nT+o8lcDWPbkBsQp4zlsbkUcyIK9cM/oUDTX1m3Rcm9/ p8N2wzRIobYrrz0tLCproyIi2swX4yKf5ZaP/e+/Kl5mdjgvu27WOxbX9dvfam7bb5BA xd9NhU37NXhIxRNu9iC6V+yrxcx3ra9c6nPMvpNEyi2Zg8PbGPpvg/o6Qvzi+2Tbly3U 1dSA== X-Gm-Message-State: AOJu0YxphvHgEo2oYj6uapeZWsAQE8htvwWK6ljinNk22AmoAyx3qMq+ 8U2MzQkaAKV03UKb+OvHl6r5On6VlZhvin/BK28= X-Received: by 2002:a05:6512:2f6:b0:4f9:6842:afc with SMTP id m22-20020a05651202f600b004f968420afcmr370132lfq.64.1695147835658; Tue, 19 Sep 2023 11:23:55 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Steve French Date: Tue, 19 Sep 2023 13:23:44 -0500 Message-ID: Subject: Re: Possible bug report: kernel 6.5.0/6.5.1 high load when CIFS share is mounted (cifsd-cfid-laundromat in"D" state) To: Tom Talpey Cc: Brian Pardy , Bagas Sanjaya , Linux CIFS , Linux Kernel Mailing List , Linux Regressions , Paulo Alcantara , ronnie sahlberg , Shyam Prasad N , Bharath S M Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-0.6 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on pete.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (pete.vger.email [0.0.0.0]); Tue, 19 Sep 2023 11:24:11 -0700 (PDT) On Tue, Sep 19, 2023 at 1:07=E2=80=AFPM Tom Talpey wrote: > > On 9/19/2023 9:38 AM, Steve French wrote: > > Minor updates (pointed out by Paulo) to patch. See attached. > > So, was the thread crashing before?? > > + if (cfids =3D=3D NULL) > + return; > + Without laundromat initialized cfids can be null - so we need to check if cfids is initialized in a few places (may help in a few corner cases if there is a race in closing laundromat thread at umount but was added to avoid oops at unmount if laundromat not initialized) > These changes are good, but I'm skeptical they will reduce the load > when the laundromat thread is actually running. All these do is avoid > creating it when not necessary, right? It does create half as many laundromat threads (we don't need laundromat on connection to IPC$) even for the Windows server target example, but helps more for cases where server doesn't support directory leases. > > On Tue, Sep 19, 2023 at 8:21=E2=80=AFAM Brian Pardy wrote: > >> > >> On Tue, Sep 19, 2023 at 1:36=E2=80=AFAM Steve French wrote: > >>> > >>> Does the attached patch help in your case? It avoids starting the > >>> laundromat thread for IPC shares (which cuts the number of the thread= s > >>> in half for many cases) and also avoids starting them if the server > >>> does not support directory leases (e.g. if Samba server instead of > >>> Windows server). > >> > >> Hello, > >> > >> I applied the 0001-smb3-do-not-start-laundromat-thread-when-dir-leases= -.patch > >> you provided against the 6.5.3 kernel. > >> > >> I can confirm that it resolves this issue - no laundromat threads are > >> created, and the reported load average is as expected, not falsely > >> high. > >> > >> This appears to fully fix the issue in my case. Thank you very much! > >> > >>> On Mon, Sep 18, 2023 at 10:00=E2=80=AFPM Steve French wrote: > >>>> > >>>> Paulo and I were discussing the laundromat thread at the SMB3.1.1 te= st > >>>> event (at SDC this week) which is now going on - will let you know > >>>> what we find. > >>>> > >>>> One obvious thing is that it probably isn't necessary for cases when > >>>> the server does not support directory leases, but we noticed another > >>>> problem as well. > > > > > > --=20 Thanks, Steve