Received: by 2002:a05:7412:d8a:b0:e2:908c:2ebd with SMTP id b10csp1269228rdg; Fri, 13 Oct 2023 16:22:41 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEiwtjJDML+sIfDzULbJm2eTR9M0+FVWNWJSXGlA0uMyL9zPrr52REjuIzYGNhHCD8mWq2p X-Received: by 2002:a05:6870:aa94:b0:1e9:e605:27a2 with SMTP id gr20-20020a056870aa9400b001e9e60527a2mr2659144oab.40.1697239361369; Fri, 13 Oct 2023 16:22:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1697239361; cv=none; d=google.com; s=arc-20160816; b=bu8tY1/HYNGVVYsbM8weYjlHcPBS06gXnGHGY/xPNDFXqtnmHwRPTGZ+V0onjr6Ke+ 8a1zX2H0ade9wgPjRFd/kEu01CpcBYguhSAdTGXR7DH8wEblxk4FdncYVw2pmE8RQKVO 4Ap1w99iS28aR+eENcwN1D5q/26oxtIft7Ynxnnn1t4c21BulbpkoAyraLVZM+8OmT6I 64wVqbwweDmiEl1TfpOaqNKvtJUmP2TdDHNtcRrQdFdNkoyWJ/E1+rLRE7b2mmm8r69D BSGar0OEb3rBaKnS5XrWXI/4F3xuNI7z5WXUC7aP0IoHmAWyC4s9GYCUtn/0y9ClpBq4 GYRg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:message-id:references :in-reply-to:subject:cc:to:from:date:mime-version:dkim-signature; bh=gPIeawjQuHddn41D6zeRo1qSWujy7kV/buuOoF9n4OY=; fh=UhDQLff9izyQLouSE0Xy/8NbzXYCxMCQrScZ7mRAP8E=; b=XZdl4rNgdGhi3XOUhbkTudqS3NVHKP0k4IwUH5eahOfxP3mea7JVHYQB+8h6b+7tSW 5C4JXq6m31/9mEufsF5o8OIISr2kJxPze9fnypXKnLYP66KUZJwxkkn/QWARonhMey06 5kHvOVTRq+tL4SI6dXzlDIe0wY+m6ZtPdLyO8Gm3ZC5eYppc5STIP84j1397TIE6UpWb IPrzaEqDUGLDAei7nKMX7arfmm/OsOm/p0uy/Ewd/vTYXqU9zlRDYSO4dZ5psydZLki8 jNPsQ+72KDlhZGTIuTnLBOWj/AMaUgQIFP/lcIXXSVQFMifgZGkgRLyIegS3dgbl1z/r pwFQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@matoro.tk header.s=20230917 header.b=pxk+1LUX; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.34 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=matoro.tk Return-Path: Received: from howler.vger.email (howler.vger.email. [23.128.96.34]) by mx.google.com with ESMTPS id j22-20020a633c16000000b00565e87d8707si2388865pga.496.2023.10.13.16.22.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 13 Oct 2023 16:22:41 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.34 as permitted sender) client-ip=23.128.96.34; Authentication-Results: mx.google.com; dkim=pass header.i=@matoro.tk header.s=20230917 header.b=pxk+1LUX; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.34 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=matoro.tk Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by howler.vger.email (Postfix) with ESMTP id 793B7807DE13; Fri, 13 Oct 2023 16:21:22 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at howler.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231924AbjJMXUc (ORCPT + 99 others); Fri, 13 Oct 2023 19:20:32 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33288 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229830AbjJMXUa (ORCPT ); Fri, 13 Oct 2023 19:20:30 -0400 Received: from matoro.tk (unknown [IPv6:2600:1700:4b10:9d80::2]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 16538BB for ; Fri, 13 Oct 2023 16:20:12 -0700 (PDT) DKIM-Signature: a=rsa-sha256; bh=gPIeawjQuHddn41D6zeRo1qSWujy7kV/buuOoF9n4OY=; c=relaxed/relaxed; d=matoro.tk; h=Subject:Subject:Sender:To:To:Cc:Cc:From:From:Date:Date:MIME-Version:MIME-Version:Content-Type:Content-Type:Content-Transfer-Encoding:Content-Transfer-Encoding:Reply-To:In-Reply-To:In-Reply-To:Message-Id:Message-Id:References:References:Autocrypt:Openpgp; i=@matoro.tk; s=20230917; t=1697239177; v=1; x=1697671177; b=pxk+1LUXTBRrIGazGe0iAZ9P+i/5Xu2Pvys6EHru0vVD5Ns9hQ3E5jOiQ7hQ/Mn0GzFbwtvL fCPG9h1dncDv5nQuF195etaOxEIPFCpMcq1+m1payiLnHdY8Qlkoo6fpKBbArmWcxQhe2Rlu3HG ViZtjYsrLNBx0ZeSMRHQpmZz7O4M+IisGCscUSytz7AnLTZr1ZFGFheFggfJs7NXK4h5Rt2ofh3 UlrBnjMEZsbJ4Ob0I8RTmtTJ2clVgGeLbgvQsJOBH3/KM7NpJZMcmsiIPXngKqdUS8mup9Wrke6 +z7a2TY7G18BU6aJBYYE0mREmoCyfaQJuyqznRlXl2CmQDVWQuA1wMUWom3xwTjvigZT9qwewyS 7wDeAt9rkZyFMuNln22tutBY+Pan4XFlXbXF2xUQryyk6qKg7XP+FIkhKLg/sTAd5rzRPAyJblr nHU9utmcG9KmoEsrog9FNxi2HRMt88f8ee6XlcMGFJUkK+WSTxTESehd8rZEmJJXx6EahwOKrox ZTXxL/E3hr3AxghoLFzDOwhYEfNyq9bmBU43fjbmyGdLlr6VfbvCZtOJkR/ztxeTjIPdJ9PcpmI /Mf5+FoayzHoh18qFPwZ0JCM6tvHXvSpm3qN0Lrtb4JQClnWQbj5T5pxWSKQ3wFehU0CQrnxHzK 9HmvyTO5i2E= Received: by matoro.tk (envelope-sender ) with ESMTPS id 0b729feb; Fri, 13 Oct 2023 19:19:37 -0400 MIME-Version: 1.0 Date: Fri, 13 Oct 2023 19:19:37 -0400 From: matoro To: "Dr. Bernd Feige" Cc: tom@talpey.com, smfrench@gmail.com, paul@darkrain42.org, linux-cifs@vger.kernel.org, bagasdotme@gmail.com, regressions@lists.linux.dev, pc@manguebit.com, ronniesahlberg@gmail.com, nspmangalore@gmail.com, brian.pardy@gmail.com, bharathsm@microsoft.com, linux-kernel@vger.kernel.org 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) In-Reply-To: <85d538fec5a086acf62d5a803056586a6c00e4bd.camel@uniklinik-freiburg.de> References: <85d538fec5a086acf62d5a803056586a6c00e4bd.camel@uniklinik-freiburg.de> Message-ID: <83d00d50bc628a85db71adb440d8afb5@matoro.tk> X-Sender: matoro_mailinglist_kernel@matoro.tk Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-0.8 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,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 howler.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 (howler.vger.email [0.0.0.0]); Fri, 13 Oct 2023 16:21:22 -0700 (PDT) On 2023-10-05 05:55, Dr. Bernd Feige wrote: > Am Dienstag, dem 26.09.2023 um 17:54 -0700 schrieb Paul Aurich: >> Perhaps the laundromat thread should be using msleep_interruptible()? >> >> Using an interruptible sleep appears to prevent the thread from >> contributing >> to the load average, and has the happy side-effect of removing the >> up-to-1s delay >> when tearing down the tcon (since a7c01fa93ae, kthread_stop() will >> return >> early triggered by kthread_stop). > > Sorry for chiming in so late - I'm also on gentoo (kernel 6.5.5- > gentoo), but as a client of Windows AD. > > Just want to emphasize that using uninterruptible sleep has not just > unhappy but devastating side-effects. > > I have 8 processors and 16 cifsd-cfid-laundromat processes, so > /proc/loadavg reports a load average of 16 on a totally idle system. > > This means that load-balancing software will never start additional > tasks on this system - "make -l" but also any other load-dependent > system. Just reducing the number of cifsd-cfid-laundromat processes > does not fix this - even a single one makes loadavg report a wrong > result for load balancing. > > So, if cifsd-cfid-laundromat must really be uninterruptible, the only > solution would be to change the way loadavg is computed by the kernel > to exclude uninterruptible but sleeping processes. But must it be > uninterruptible? > > Thanks and best regards, > Bernd This is a huge problem here as well, as a client to Samba using SMB1 (for Unix extensions). For others encountering this problem, I was able to work around it with the following snippet: diff --git a/fs/smb/client/cached_dir.c b/fs/smb/client/cached_dir.c index 2d5e9a9d5b8b..fc2caccb597a 100644 --- a/fs/smb/client/cached_dir.c +++ b/fs/smb/client/cached_dir.c @@ -576,7 +576,7 @@ cifs_cfids_laundromat_thread(void *p) struct list_head entry; while (!kthread_should_stop()) { - ssleep(1); + msleep_interruptible(1000); INIT_LIST_HEAD(&entry); if (kthread_should_stop()) return 0;