From: Jingbo Xu <jefflexu@linux.alibaba.com>
To: Miklos Szeredi <miklos@szeredi.hu>
Cc: Bernd Schubert <bernd.schubert@fastmail.fm>,
linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] fuse: make foffset alignment opt-in for optimum backend performance
Date: Fri, 30 Aug 2024 10:10:21 +0800 [thread overview]
Message-ID: <09c09a93-d3c3-45c6-bc6a-780423e07b5c@linux.alibaba.com> (raw)
In-Reply-To: <CAJfpegsgCJEv=XxuHgo+Qn-3y8Rc_Bsmt2YKTHn4XaBqvgshew@mail.gmail.com>
On 8/29/24 3:51 PM, Miklos Szeredi wrote:
> On Fri, 5 Jul 2024 at 14:00, Jingbo Xu <jefflexu@linux.alibaba.com> wrote:
>> I'm okay with resuing max_pages as the alignment constraint. They are
>> the same in our internal scenarios. But I'm not sure if it is the case
>> in other scenarios.
>
> max_pages < alignment makes little sense.
>
> max_pages = n * alignment could make sense, i.e. allow writes that are
> whole multiples of the alignment.
Agreed.
>
> I'm not against adding a separate alignment, but it could be just
> uint8_t to take up less space in init_out. We could have done that
> with max_stack_depth too. Oh well...
Make sense, as the new added fuse_init_out.opt_alignment is already
log2(byte alignment). I think uint8_t is already adequate in this case.
(Actually I'm going to rename @opt_alignment field of fuse_init_out to
something like @log_opt_align to indicate it's actually a log2() value
as Berned previously suggested)
Besides, I'm not sure if it's worth adding a new init flag, i.e.
FUSE_OPT_ALIGNMENT, as the init flag bits are continually consumed.
Maybe we could stipulate that a zero log_opt_align indicates no
alignment constraint (the default behavior), while a non-zero
log_opt_align indicates an alignment constraint. However IIUC the user
daemon may or may not zero the unused fields of fuse_init_out. Thus if
a fuse server not supporting opt_alignment doesn't zero
fuse_init_out.unused, then the kernel side will enforce an alignment
constraint unexpectedly.
--
Thanks,
Jingbo
prev parent reply other threads:[~2024-08-30 2:10 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-07-05 10:04 Jingbo Xu
2024-07-05 11:50 ` Bernd Schubert
2024-07-05 12:00 ` Jingbo Xu
2024-08-29 7:51 ` Miklos Szeredi
2024-08-30 2:10 ` Jingbo Xu [this message]
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=09c09a93-d3c3-45c6-bc6a-780423e07b5c@linux.alibaba.com \
--to=jefflexu@linux.alibaba.com \
--cc=bernd.schubert@fastmail.fm \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=miklos@szeredi.hu \
/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
all inboxes | Powered by JetHome®