linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Sweet Tea Dorminy <sweettea-kernel@dorminy.me>
To: Joanne Koong <joannelkoong@gmail.com>,
	Josef Bacik <josef@toxicpanda.com>
Cc: miklos@szeredi.hu, linux-fsdevel@vger.kernel.org,
	osandov@osandov.com, laoji.jx@alibaba-inc.com,
	kernel-team@meta.com
Subject: Re: [PATCH] fuse: Enable dynamic configuration of FUSE_MAX_MAX_PAGES
Date: Mon, 1 Jul 2024 15:15:25 -0400	[thread overview]
Message-ID: <8142b5da-db91-4f3e-ac63-6a476bc4f413@dorminy.me> (raw)
In-Reply-To: <CAJnrk1YAt-dRUMYdS8TyyiXYG32nNBc_gTE0FeP0=XCZF3-pQA@mail.gmail.com>



On 7/1/24 12:48 PM, Joanne Koong wrote:
> On Fri, Jun 28, 2024 at 11:03 AM Josef Bacik <josef@toxicpanda.com> wrote:
>>
>> On Thu, Jun 27, 2024 at 05:13:55PM -0700, Joanne Koong wrote:
>>> Introduce the capability to dynamically configure the FUSE_MAX_MAX_PAGES
>>> limit through a sysctl. This enhancement allows system administrators to
>>> adjust the value based on system-specific requirements.
>>>
>>> This removes the previous static limit of 256 max pages, which limits
>>> the max write size of a request to 1 MiB (on 4096 pagesize systems).
>>> Having the ability to up the max write size beyond 1 MiB allows for the
>>> perf improvements detailed in this thread [1].
>>>
>>> $ sysctl -a | grep fuse_max_max_pages
>>> fs.fuse.fuse_max_max_pages = 256
>>>
>>> $ sysctl -n fs.fuse.fuse_max_max_pages
>>> 256
>>>
>>> $ echo 1024 | sudo tee /proc/sys/fs/fuse/fuse_max_max_pages
>>> 1024
>>>
>>> $ sysctl -n fs.fuse.fuse_max_max_pages
>>> 1024
>>>
>>> [1] https://lore.kernel.org/linux-fsdevel/20240124070512.52207-1-jefflexu@linux.alibaba.com/T/#u
>>>
>>> Signed-off-by: Joanne Koong <joannelkoong@gmail.com>
>>
>> Overall the change is great, and I see why you named it the way you did, but I
>> think may be 'fuse_max_pages_limit' may be a better name?  The original constant
>> name wasn't great, but it was fine in its context.  I think having it as an
>> interface we should name it something less silly.
> 
> 'fuse_max_pages_limit' sounds great to me. I'll submit v2 with this rename.
> 

Whatever-it's-called might make sense to be in bytes, since max_read, 
max_write are the values visible to a userspace fuse server and are in 
bytes.

Additionally, the sysctl should probably disallow values at or above 
1<<16 pages -- fuse_init_out expects that max_pages fits in a u16, and 
there are a couple of places where fc->max_pages << PAGE_SHIFT is 
expected to fit in a u32. fc->max_pages is constrained by max_max_pages 
at present so this is true but would not be true if max_max_pages is 
only constrained by being a uint.

  reply	other threads:[~2024-07-01 19:22 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-06-28  0:13 [PATCH] fuse: Enable dynamic configuration of FUSE_MAX_MAX_PAGES Joanne Koong
2024-06-28 18:03 ` Josef Bacik
2024-07-01 16:48   ` Joanne Koong
2024-07-01 19:15     ` Sweet Tea Dorminy [this message]
2024-07-01 23:28       ` 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=8142b5da-db91-4f3e-ac63-6a476bc4f413@dorminy.me \
    --to=sweettea-kernel@dorminy.me \
    --cc=joannelkoong@gmail.com \
    --cc=josef@toxicpanda.com \
    --cc=kernel-team@meta.com \
    --cc=laoji.jx@alibaba-inc.com \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=miklos@szeredi.hu \
    --cc=osandov@osandov.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;
as well as URLs for NNTP newsgroup(s).