From: John Groves <john@groves.net>
To: Miklos Szeredi <mszeredi@redhat.com>
Cc: fuse-devel@lists.linux.dev, Amir Goldstein <amir73il@gmail.com>,
"Darrick J . Wong" <djwong@kernel.org>,
Vishal Verma <vishal.l.verma@intel.com>,
Dave Jiang <dave.jiang@intel.com>,
Alison Schofield <alison.schofield@intel.com>,
nvdimm@lists.linux.dev, linux-cxl@vger.kernel.org,
linux-fsdevel@vger.kernel.org, david@kernel.org,
willy@infradead.org, brauner@kernel.org
Subject: Re: [PATCH v2 0/8] fuse: DAX device based extent maps (famfs)
Date: Mon, 5 Oct 2026 18:27:43 -0500 [thread overview]
Message-ID: <asQcBebepPb9CXzS@groves.net> (raw)
In-Reply-To: <20261001150935.655979-1-mszeredi@redhat.com>
On 26/10/01 05:07PM, Miklos Szeredi wrote:
> This is the FUSIfication of the famfs-fuse patchset.
This series (v1) was sent on the day I left on a vacation from which I
returned at the end of last week.
I feel I should acknowledge this and assure everybody that I'm working
through it. This really runs my famfs/fuse patches through a
chipper/shredder, and it is gonna take me some time to review it,
understand it and test it.
A few comments below, and specific patch comments should start trickling out.
One very high level quip though: If you're comfortable with this, go ahead
and merge it. We can fix bugs and performance problems, if any, in due
course. I'm serious about that.
>
> - extent maps are assigned to a backing ID
>
> - 64 bit backing ID's managed by server
I thought we agreed you weren't gonna do these two, but if it does no harm,
whatever.
>
> - maps can be linear or cyclic (striped)
Please correct me if any of my analysis below is wrong...
Here what you've done is remove my explicitly interleaved extent lists,
which have a header containing a chunk size and a set of strip extents (which
are basically fully self-describing), and replace is with just simple extent
lists that have an optional CYCLIC flag in the header. If the flag is set on
an extent list, (and let's say the strip extents need to be 1GiB and the
chunk size is 2MiB), each CYCLIC extent gets its size set to the chunk size
and the kernel trusts that the actual size allocated per stirp is actually
sufficient that i_size will not cycle past the end of the *actually*
allocated size of each strip extent.
This resembles an idea I considered, to try to make the metadata *look*
simpler while still carrying the info that needs to be conveyed. But this
implementation feels pretty janky to me, and it should at least be
meticulously documented. Better might be to put the chunk_size in the header,
and then you arguably don't need the CYCLIC flag, since non-zero chunk_size
means the same thing. But actually, you can accept multiple CYCLIC strip
lists if you set chunk_size and then set the CYCLIC flag on the first of
each strip set.
I see the kernel-side rejects these s/size/chunk_size/ strip extents if they
are not all the same size. Why not put the chunk size in the header and let
the extents honestly describe the offset and range that they cover?
The current design can't test for sufficient strip extent sizes, although
it replaces code that did verify this.
>
> - API supports nesting, but not implemented yet (i.e. multiple striped
> extents per inode, a-la famfs)
>
> libfuse/famfs trees for testing:
>
> https://github.com/szmi/libfuse.git#extent-map-v2
> https://github.com/szmi/famfs.git#extent-map-v2
>
> This patchset:
>
> git://git.kernel.org/pub/scm/linux/kernel/git/mszeredi/fuse.git#extent-map-v2
>
> Passes famfs smoke test on emulated dax device.
Thank you for doing that. Prior to this there have been many strong opinions
but none of the holders of said opinions built or tested famfs.
However, the smoke tests passing isn't fully legit, because the patch to the
famfs fuse server passes the entire strip size on CYCLIC mappings, meaning
it just produces a concatenation of ranges - which does not achieve the
interleaving goal at all. That case degenerates to simple extents.
If this is the new design for passing cycling maps into the kernel, a test
will be added to catch this - but it's brand new and didn't get a test added,
so it wasn't caught automatically.
>
> Comments are welcome.
One more... This patch inserts an rbtree lookup into the fault path via the
very-performance-critical fuse_ext_map_iomap_begin() path. This is
performance-critical because it handles TLB/PTE/PMD faults when the memory
is never sparse (no I/O to amortize over). The code you replaced did several
things to avoid this sort of chasing:
- With interleaved extent lists, strip and strip-offset can be calculated
in order 1 (and then strip overflow can be checked and avoided)
- Simple extent lists were checked for constant extent sizes; if constant,
we can just index into the list (also order 1)
Why do I want to avoid an rbtree lookup or the bpf nonsense in the fault path?
"Because this is memory and it must run at memory speeds" --yours truly
To be specific: each chase/dereference that results in an L3 cache miss adds
a stall of (1 * MEMORY_LATENCY) to the fault time. This is the good reason
why I didn't do any chasing in the fault path of the famfs code that you're
replacing.
OK, one more. You're using the rbtree for indexing by file offset, which is
a zero-based non-sparse range in this case. If this could not be avoided
(which I think it can) you should use an xarray or radix tree for that...
right?
>
> Thanks,
> Miklos
>
> ---
> Changes since v1:
>
> - moved 3 prep patches to fuse.git#for-next
> - introduce FUSE_PASSTHROUGH_V2 (Amir)
> - lots of small fixes and cleanups (Amir, Sashiko)
>
> ---
> John Groves (1):
> dax: replace exported dax_dev_get() with non-allocating dax_dev_find()
Golly, it seems like there's more than 1 patch worth of content from me here,
but the chipper/shredder might meet the letter of copyright law in some
jurisdictions...
>
> Miklos Szeredi (7):
> fuse: add helpers for EIO return value with kernel message
> fuse: support 64 bit, server allocated backing ID
> fuse: support opening 64 bit backing ID
> fuse: add support for opening dax device as backing
> fuse: add extent map data structure
> fuse: add extent map I/O support
> fuse: add support for striped backing
>
> drivers/dax/super.c | 38 ++++-
> fs/fuse/Makefile | 2 +-
> fs/fuse/backing.c | 292 ++++++++++++++++++++++++++++++-------
> fs/fuse/dev.c | 21 +++
> fs/fuse/dev.h | 3 +
> fs/fuse/dir.c | 3 +-
> fs/fuse/ext_map.c | 299 ++++++++++++++++++++++++++++++++++++++
> fs/fuse/file.c | 16 +-
> fs/fuse/fuse_i.h | 72 +++++++--
> fs/fuse/inode.c | 17 ++-
> fs/fuse/iomode.c | 108 +++++++-------
> fs/fuse/notify.c | 75 ++++++++++
> fs/fuse/passthrough.c | 63 ++++----
> include/linux/dax.h | 6 +-
> include/uapi/linux/fuse.h | 53 ++++++-
> 15 files changed, 904 insertions(+), 164 deletions(-)
> create mode 100644 fs/fuse/ext_map.c
>
> --
> 2.54.0
>
John
next prev parent reply other threads:[~2026-10-05 23:37 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-01 15:07 [PATCH v2 0/8] fuse: DAX device based extent maps (famfs) Miklos Szeredi
2026-10-01 15:07 ` [PATCH v2 1/8] dax: replace exported dax_dev_get() with non-allocating dax_dev_find() Miklos Szeredi
2026-10-01 15:07 ` [PATCH v2 2/8] fuse: add helpers for EIO return value with kernel message Miklos Szeredi
2026-10-01 15:18 ` sashiko-bot
2026-10-01 16:32 ` Amir Goldstein
2026-10-05 9:46 ` Miklos Szeredi
2026-10-01 15:07 ` [PATCH v2 3/8] fuse: support 64 bit, server allocated backing ID Miklos Szeredi
2026-10-01 15:26 ` sashiko-bot
2026-10-01 17:07 ` Amir Goldstein
2026-10-01 18:58 ` Amir Goldstein
2026-10-05 13:33 ` Miklos Szeredi
2026-10-06 21:24 ` Amir Goldstein
2026-10-07 12:46 ` Miklos Szeredi
2026-10-01 15:07 ` [PATCH v2 4/8] fuse: support opening 64 bit " Miklos Szeredi
2026-10-01 15:22 ` sashiko-bot
2026-10-01 17:09 ` Amir Goldstein
2026-10-01 15:07 ` [PATCH v2 5/8] fuse: add support for opening dax device as backing Miklos Szeredi
2026-10-01 15:30 ` sashiko-bot
2026-10-01 16:07 ` Amir Goldstein
2026-10-01 15:07 ` [PATCH v2 6/8] fuse: add extent map data structure Miklos Szeredi
2026-10-01 15:24 ` sashiko-bot
2026-10-01 15:07 ` [PATCH v2 7/8] fuse: add extent map I/O support Miklos Szeredi
2026-10-01 15:27 ` sashiko-bot
2026-10-01 16:11 ` Amir Goldstein
2026-10-01 15:07 ` [PATCH v2 8/8] fuse: add support for striped backing Miklos Szeredi
2026-10-05 23:27 ` John Groves [this message]
2026-10-06 9:48 ` [PATCH v2 0/8] fuse: DAX device based extent maps (famfs) Miklos Szeredi
2026-10-08 23:00 ` John Groves
2026-10-09 10:39 ` Miklos Szeredi
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=asQcBebepPb9CXzS@groves.net \
--to=john@groves.net \
--cc=alison.schofield@intel.com \
--cc=amir73il@gmail.com \
--cc=brauner@kernel.org \
--cc=dave.jiang@intel.com \
--cc=david@kernel.org \
--cc=djwong@kernel.org \
--cc=fuse-devel@lists.linux.dev \
--cc=linux-cxl@vger.kernel.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=mszeredi@redhat.com \
--cc=nvdimm@lists.linux.dev \
--cc=vishal.l.verma@intel.com \
--cc=willy@infradead.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