mbox series

[v3,0/1] fuse: dynamically configure max pages limit through sysctl

Message ID 20240923171311.1561917-1-joannelkoong@gmail.com (mailing list archive)
Headers show
Series fuse: dynamically configure max pages limit through sysctl | expand

Message

Joanne Koong Sept. 23, 2024, 5:13 p.m. UTC
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