From: Demi Marie Obenour <demiobenour@gmail.com>
To: djwong@kernel.org
Cc: bernd@bsbernd.com, joannelkoong@gmail.com,
linux-ext4@vger.kernel.org, linux-fsdevel@vger.kernel.org,
miklos@szeredi.hu, neal@gompa.dev,
linux-bcachefs@vger.kernel.org, linux-btrfs@vger.kernel.org,
zfs-devel@list.zfsonlinux.org
Subject: Re: [PATCHSET v6 4/8] fuse: allow servers to use iomap for better file IO performance
Date: Wed, 19 Nov 2025 04:19:36 -0500 [thread overview]
Message-ID: <d0a122b8-3b25-44e6-8c60-538c81b35228@gmail.com> (raw)
In-Reply-To: <176169810144.1424854.11439355400009006946.stgit@frogsfrogsfrogs>
[-- Attachment #1.1.1: Type: text/plain, Size: 2626 bytes --]
> By keeping the I/O path mostly within the kernel, we can dramatically
> increase the speed of disk-based filesystems.
ZFS, BTRFS, and bcachefs all support compression, checksumming,
and RAID. ZFS and bcachefs also support encryption, and f2fs and
ext4 support fscrypt.
Will this patchset be able to improve FUSE implementations of these
filesystems? I'd rather not be in the situation where one can have
a FUSE filesystem that is fast, but only if it doesn't support modern
data integrity or security features.
I'm not a filesystem developer, but here are some ideas (that you
can take or leave):
1. Keep the compression, checksumming, and/or encryption in-kernel,
and have userspace tell the kernel what algorithm and/or encryption
key to use. These algorithms are generally well-known and secure
against malicious input. It might be necessary to make an extra
data copy, but ideally that copy could just stay within the
CPU caches.
2. Somehow integrate with the blk-crypto framework. This has the
advantage that it supports inline encryption hardware, which
I suspect is needed for this to be usable on mobile devices.
After all, the keys on these systems are often not even visible
to the kernel, let alone to userspace.
3. Figure out a way to make a userspace data path fast enough.
To prevent data corruption by unprivileged users of the FS,
it's necessary to make a copy before checksumming, compression,
or authenticated encryption. If this copy is done in the kernel,
the server doesn't have to perform its own copy. By using large
ring buffers, it might be possible to amortize the context switch
cost away.
Authenticated encryption also needs a copy in the *other* direction:
if the (untrusted) client can see unauthenticated plaintext, it's
a security vulnerability. That needs another copy from server
buffers to client buffers, and the kernel can do that as well.
4. Make context switches much faster. L4-style IPC is incredibly fast,
at least if one doesn't have to worry about Spectre. Unfortunately,
nowadays one *does* need to worry about Spectre.
Obviously, none of these will be as fast as doing DMA directly to user
buffers. However, all of these features (except for encryption using
inline encryption hardware) come at a performance penalty already.
I just don't want a FUSE server to have to pay a much larger penalty
than a kernel filesystem would.
I'm CCing the bcachefs, BTRFS, and ZFS-on-Linux mailing lists.
--
Sincerely,
Demi Marie Obenour (she/her/hers)
[-- Attachment #1.1.2: OpenPGP public key --]
[-- Type: application/pgp-keys, Size: 7253 bytes --]
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
next parent reply other threads:[~2025-11-19 9:19 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <176169810144.1424854.11439355400009006946.stgit@frogsfrogsfrogs>
2025-11-19 9:19 ` Demi Marie Obenour [this message]
2025-11-19 9:41 ` [PATCHSET v6 4/8] fuse: allow servers to use iomap for better file IO performance Gao Xiang
2025-11-19 18:04 ` Darrick J. Wong
2025-11-19 21:00 ` Gao Xiang
2025-11-19 21:51 ` Gao Xiang
2025-11-20 1:13 ` Demi Marie Obenour
2025-11-20 1:10 ` Demi Marie Obenour
2025-11-20 1:49 ` Gao Xiang
2025-11-20 1:05 ` Demi Marie Obenour
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=d0a122b8-3b25-44e6-8c60-538c81b35228@gmail.com \
--to=demiobenour@gmail.com \
--cc=bernd@bsbernd.com \
--cc=djwong@kernel.org \
--cc=joannelkoong@gmail.com \
--cc=linux-bcachefs@vger.kernel.org \
--cc=linux-btrfs@vger.kernel.org \
--cc=linux-ext4@vger.kernel.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=miklos@szeredi.hu \
--cc=neal@gompa.dev \
--cc=zfs-devel@list.zfsonlinux.org \
/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