linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Joanne Koong <joannelkoong@gmail.com>
To: miklos@szeredi.hu, linux-fsdevel@vger.kernel.org
Cc: josef@toxicpanda.com, bernd.schubert@fastmail.fm,
	sweettea-kernel@dorminy.me, jefflexu@linux.alibaba.com,
	kernel-team@meta.com
Subject: [PATCH v3 0/1]  fuse: dynamically configure max pages limit through sysctl
Date: Mon, 23 Sep 2024 10:13:10 -0700	[thread overview]
Message-ID: <20240923171311.1561917-1-joannelkoong@gmail.com> (raw)

The motivation behind this patch is to increase the max buffer size allowed
for a write request. Currently, this is gated by FUSE_MAX_MAX_PAGES which is
statically set to 256 pages. As such, this limits the buffer size on a write
request to 1 MiB on a 4k-page system. Perf improvements have been seen [1] with
larger write buffer size limits.

This patch adds a sysctl for allowing system administrators to dynamically
configure the max number of pages that can be used for servicing requests in
FUSE. The default value is the original limit (256 pages).

[1] https://lore.kernel.org/linux-fsdevel/20240124070512.52207-1-jefflexu@linux.alibaba.com/T/#u

v2 -> v3:
* Gate sysctl.o behind CONFIG_SYSCTL in Makefile (kernel test robot)
* Reword commit message

v2:
https://lore.kernel.org/linux-fsdevel/20240702014627.4068146-1-joannelkoong@gmail.com/
https://lore.kernel.org/linux-fsdevel/20240905174541.392785-1-joannelkoong@gmail.com/
v1 -> v2:
* Rename fuse_max_max_pages to fuse_max_pages_limit internally
* Rename /proc/sys/fs/fuse/fuse_max_max_pages to
  /proc/sys/fs/fuse/max_pages_limit
* Restrict fuse max_pages_limit sysctl values to between 1 and 65535
  (inclusive)

v1: https://lore.kernel.org/linux-fsdevel/20240628001355.243805-1-joannelkoong@gmail.com/

Joanne Koong (1):
  fuse: Enable dynamic configuration of fuse max pages limit
    (FUSE_MAX_MAX_PAGES)

 Documentation/admin-guide/sysctl/fs.rst | 10 +++++++
 fs/fuse/Makefile                        |  1 +
 fs/fuse/fuse_i.h                        | 14 +++++++--
 fs/fuse/inode.c                         | 11 ++++++-
 fs/fuse/ioctl.c                         |  4 ++-
 fs/fuse/sysctl.c                        | 40 +++++++++++++++++++++++++
 6 files changed, 75 insertions(+), 5 deletions(-)
 create mode 100644 fs/fuse/sysctl.c

-- 
2.43.5


             reply	other threads:[~2024-09-23 17:13 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-09-23 17:13 Joanne Koong [this message]
2024-09-23 17:13 ` [PATCH v3 1/1] fuse: enable dynamic configuration of fuse max pages limit (FUSE_MAX_MAX_PAGES) Joanne Koong
2024-09-24  9:43   ` Miklos Szeredi
2024-09-24 21:32     ` Joanne Koong

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=20240923171311.1561917-1-joannelkoong@gmail.com \
    --to=joannelkoong@gmail.com \
    --cc=bernd.schubert@fastmail.fm \
    --cc=jefflexu@linux.alibaba.com \
    --cc=josef@toxicpanda.com \
    --cc=kernel-team@meta.com \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=miklos@szeredi.hu \
    --cc=sweettea-kernel@dorminy.me \
    /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;
as well as URLs for NNTP newsgroup(s).