From: matoro <matoro_mailinglist_kernel@matoro.tk>
To: "Dr. Bernd Feige" <bernd.feige@uniklinik-freiburg.de>
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)
Date: Fri, 13 Oct 2023 19:19:37 -0400 [thread overview]
Message-ID: <83d00d50bc628a85db71adb440d8afb5@matoro.tk> (raw)
In-Reply-To: <85d538fec5a086acf62d5a803056586a6c00e4bd.camel@uniklinik-freiburg.de>
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;
next prev parent reply other threads:[~2023-10-13 23:20 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <CAO+kfxTwOvaxYV0ZRESxZB-4LHsF9b_VBjAKahhwUm5a1_c4ug@mail.gmail.com>
2023-09-06 1:01 ` Possible bug report: kernel 6.5.0/6.5.1 high load when CIFS share is mounted (cifsd-cfid-laundromat in"D" state) 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
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 [this message]
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=83d00d50bc628a85db71adb440d8afb5@matoro.tk \
--to=matoro_mailinglist_kernel@matoro.tk \
--cc=bagasdotme@gmail.com \
--cc=bernd.feige@uniklinik-freiburg.de \
--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=paul@darkrain42.org \
--cc=pc@manguebit.com \
--cc=regressions@lists.linux.dev \
--cc=ronniesahlberg@gmail.com \
--cc=smfrench@gmail.com \
--cc=tom@talpey.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