Linux CIFS filesystem development
 help / color / mirror / Atom feed
From: Tom Talpey <tom@talpey.com>
To: Steve French <smfrench@gmail.com>, Brian Pardy <brian.pardy@gmail.com>
Cc: Bagas Sanjaya <bagasdotme@gmail.com>,
	Linux CIFS <linux-cifs@vger.kernel.org>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	Linux Regressions <regressions@lists.linux.dev>,
	Paulo Alcantara <pc@manguebit.com>,
	ronnie sahlberg <ronniesahlberg@gmail.com>,
	Shyam Prasad N <nspmangalore@gmail.com>,
	Bharath S M <bharathsm@microsoft.com>
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)
Date: Tue, 19 Sep 2023 11:06:52 -0700	[thread overview]
Message-ID: <a895f860-11fa-e6d9-d042-a32bd08f9e9d@talpey.com> (raw)
In-Reply-To: <CAH2r5msNf9WDHrBZSi5FhHDSewSNxMAuXTetMJDnoNh3CF_oMA@mail.gmail.com>

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 == NULL)
+		return;
+
  	spin_lock(&cfids->cfid_list_lock);


This if/else, IMO...

@@ -2492,7 +2493,10 @@ cifs_get_tcon(struct cifs_ses *ses, struct 
smb3_fs_context *ctx)
  		goto out_fail;
  	}

-	tcon = tconInfoAlloc();
+	if (ses->server->capabilities & SMB2_GLOBAL_CAP_DIRECTORY_LEASING)
+		tcon = tcon_info_alloc(true);
+	else
+		tcon = tcon_info_alloc(false);

would be more readable as...

	tcon = tcon_info_alloc(ses->server->capabilities & 
SMB2_GLOBAL_CAP_DIRECTORY_LEASING != 0);


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?

Acked-by: Tom Talpey <tom@talpey.com>

Tom.


> 
> On Tue, Sep 19, 2023 at 8:21 AM Brian Pardy <brian.pardy@gmail.com> wrote:
>>
>> On Tue, Sep 19, 2023 at 1:36 AM Steve French <smfrench@gmail.com> wrote:
>>>
>>> Does the attached patch help in your case?  It avoids starting the
>>> laundromat thread for IPC shares (which cuts the number of the threads
>>> 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 PM Steve French <smfrench@gmail.com> wrote:
>>>>
>>>> Paulo and I were discussing the laundromat thread at the SMB3.1.1 test
>>>> 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.
> 
> 
> 

  parent reply	other threads:[~2023-09-19 18:07 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-09-05 17:09 Possible bug report: kernel 6.5.0/6.5.1 high load when CIFS share is mounted (cifsd-cfid-laundromat in"D" state) Brian Pardy
2023-09-06  1:01 ` Bagas Sanjaya
2023-09-06 21:03   ` Brian Pardy
2023-09-07  3:40     ` Linux regression tracking #update (Thorsten Leemhuis)
2023-09-18 22:55     ` Brian Pardy
2023-09-19  3:00       ` Steve French
2023-09-19  5:36         ` Steve French
2023-09-19 13:21           ` Brian Pardy
2023-09-19 16:38             ` Steve French
2023-09-19 17:42               ` Brian Pardy
2023-09-19 18:06               ` Tom Talpey [this message]
2023-09-19 18:23                 ` Steve French
2023-09-27  0:54                   ` Paul Aurich
2023-10-05  9:55                     ` Dr. Bernd Feige
2023-10-05  9:59                       ` Steve French
2023-10-13 23:19                       ` matoro
2023-10-13 23:52                         ` Paulo Alcantara
2023-10-14  0:01                           ` Paulo Alcantara
     [not found]                             ` <CAH2r5mse_2sfXF+tdTmie5LLtBuc+6DOumDH3rn=5V24yhrYVQ@mail.gmail.com>
2023-10-14  0:59                               ` matoro
2023-10-16 18:41                                 ` Paulo Alcantara
2023-10-20 14:37                                   ` Dr. Bernd Feige
2023-10-23 14:07                                     ` Paulo Alcantara
2023-10-24  2:51                                       ` Steve French
2023-09-19  3:01       ` Steve French
2023-10-20 10:40   ` Linux regression tracking #update (Thorsten Leemhuis)

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=a895f860-11fa-e6d9-d042-a32bd08f9e9d@talpey.com \
    --to=tom@talpey.com \
    --cc=bagasdotme@gmail.com \
    --cc=bharathsm@microsoft.com \
    --cc=brian.pardy@gmail.com \
    --cc=linux-cifs@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=nspmangalore@gmail.com \
    --cc=pc@manguebit.com \
    --cc=regressions@lists.linux.dev \
    --cc=ronniesahlberg@gmail.com \
    --cc=smfrench@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox