[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <175797570193.246189.18292292585216876168.stgit@frogsfrogsfrogs>
Date: Mon, 15 Sep 2025 15:43:27 -0700
From: "Darrick J. Wong" <djwong@...nel.org>
To: tytso@....edu
Cc: linux-ext4@...r.kernel.org
Subject: [PATCH 10/11] fuse2fs: constrain worker thread count
From: Darrick J. Wong <djwong@...nel.org>
fuse2fs isn't all that scalable -- there's a big kernel lock around all
the libext2fs code. Constrain the fuse worker thread count to reduce
unnecessary lock contention.
Signed-off-by: "Darrick J. Wong" <djwong@...nel.org>
---
misc/fuse2fs.c | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/misc/fuse2fs.c b/misc/fuse2fs.c
index 1f2700b5f95270..e54a2d7f9ae523 100644
--- a/misc/fuse2fs.c
+++ b/misc/fuse2fs.c
@@ -5102,6 +5102,14 @@ int main(int argc, char *argv[])
"-oallow_other,default_permissions,suid,dev");
}
+ /*
+ * Since there's a Big Kernel Lock around all the libext2fs code, we
+ * only need to start four threads -- one to decode a request, another
+ * to do the filesystem work, a third to transmit the reply, and a
+ * fourth to handle fuse notifications.
+ */
+ fuse_opt_insert_arg(&args, 1, "-omax_threads=4");
+
if (fctx.debug) {
int i;
Powered by blists - more mailing lists