From: Joanne Koong <joannelkoong@gmail.com>
To: Anuj gupta <anuj1072538@gmail.com>
Cc: miklos@szeredi.hu, djwong@kernel.org, brauner@kernel.org,
linux-fsdevel@vger.kernel.org, linux-xfs@vger.kernel.org,
bernd.schubert@fastmail.fm, kernel-team@meta.com,
Anuj Gupta <anuj20.g@samsung.com>
Subject: Re: [PATCH v1 0/8] fuse: use iomap for buffered writes + writeback
Date: Mon, 9 Jun 2025 12:59:19 -0700 [thread overview]
Message-ID: <CAJnrk1Z2QSVbALJpt2-nXjg+gFDH2mdnXUDTMEkyhxcvwh8B5A@mail.gmail.com> (raw)
In-Reply-To: <CACzX3As_tiO3c0ko9WJKTOt10dj0q9gNqPym3zFdUbLxib=YNw@mail.gmail.com>
On Sun, Jun 8, 2025 at 12:13 PM Anuj gupta <anuj1072538@gmail.com> wrote:
>
> On Sat, Jun 7, 2025 at 5:12 AM Joanne Koong <joannelkoong@gmail.com> wrote:
> >
> > This series adds fuse iomap support for buffered writes and dirty folio
> > writeback. This is needed so that granular dirty tracking can be used in
> > fuse when large folios are enabled so that if only a few bytes in a large
> > folio are dirty, only a smaller portion is written out instead of the entire
> > folio.
> >
> > In order to do so, a new iomap type, IOMAP_IN_MEM, is added that is more
> > generic and does not depend on the block layer. The parts of iomap buffer io
> > that depend on bios and CONFIG_BLOCK is moved to a separate file,
> > buffered-io-bio.c, in order to allow filesystems that do not have CONFIG_BLOCK
> > set to use IOMAP_IN_MEM buffered io.
> >
> > This series was run through fstests with large folios enabled and through
> > some quick sanity checks on passthrough_hp with a) writing 1 GB in 1 MB chunks
> > and then going back and dirtying a few bytes in each chunk and b) writing 50 MB
> > in 1 MB chunks and going through dirtying the entire chunk for several runs.
> > a) showed about a 40% speedup increase with iomap support added and b) showed
> > roughly the same performance.
> >
> > This patchset does not enable large folios yet. That will be sent out in a
> > separate future patchset.
> >
> >
> > Thanks,
> > Joanne
>
> Hi Joanne,
>
> I tried experimenting with your patch series to evaluate its impact. To
> measure the improvement, I enabled large folios for FUSE. In my setup,
> I observed a ~43% reduction in writeback time.
>
> Here’s the script[1] I used to benchmark FUSE writeback performance
> based on the details you shared: It formats and mounts an XFS volume,
> runs the passthrough_hp FUSE daemon, writes 1MB chunks to populate the
> file, and then issues 4-byte overwrites to test fine-grained writeback
> behavior.
>
> If I’ve missed anything or there’s a better way to evaluate this, I’d
> really appreciate your input — I’m still getting up to speed with FUSE
> internals.
Hi Anuj,
Thanks for testing it out locally and sharing the benchmarks. Your
test is pretty much the same as mine (except the underlying filesystem
I used for passthrough is ext4). I saw roughly a 40% speedup as well
for buffered writes.
My main concern was whether iomap overhead ends up slowing down writes
that don't need granular dirty tracking. I didn't see any noticeable
difference in performance though when I tested it out by writing out
all entire chunks.
>
> [1]
>
> #!/bin/bash
> set -e
>
> DEVICE="/dev/nvme0n1"
> BACKING_MNT="/mnt"
> FUSE_MNT="/tmp/fusefs"
> CHUNK_MB=1
> TOTAL_MB=1024
> DIRTY_BYTES=4
> REPEATS=5
> LOGFILE="fuse_test_results.csv"
> DIR=$(date +"%H-%M-%S-%d-%m-%y")
>
> mkdir $DIR
> echo "$DIR created"
>
> mkdir -p "$BACKING_MNT" "$FUSE_MNT"
>
> echo "run,duration_seconds" > "$LOGFILE"
>
> for run in $(seq 1 $REPEATS); do
> echo "[Run $run] Formatting $DEVICE with XFS..."
> mkfs.xfs -f "$DEVICE"
>
> echo "[Run $run] Mounting XFS to $BACKING_MNT..."
> mount "$DEVICE" "$BACKING_MNT"
>
> echo "[Run $run] Starting passthrough_hp on $FUSE_MNT..."
> ./passthrough_hp --nopassthrough "$BACKING_MNT" "$FUSE_MNT" &
> sleep 2
>
> echo "[Run $run] Dropping caches and syncing..."
> sync
> echo 3 > /proc/sys/vm/drop_caches
>
> TEST_FILE="$FUSE_MNT/testfile_run${run}"
>
> for ((i=0; i<$TOTAL_MB; i++)); do
> dd if=/dev/urandom bs=1M count=1 oflag=direct seek=$i
> of=$TEST_FILE status=none
> done
>
> START=$(date +%s.%N)
> for ((i=0; i<$TOTAL_MB; i++)); do
> offset=$((i * 1048576 + 1048572))
> #offset=$((i * 1048576))
> dd if=/dev/urandom bs=1 count=$DIRTY_BYTES of=$TEST_FILE
> seek=$offset status=none
> done
>
> fusermount -u "$FUSE_MNT"
> umount "$BACKING_MNT"
>
> END=$(date +%s.%N)
> DURATION=$(echo "$END - $START" | bc)
> echo "$run,$DURATION" >> $DIR/"$LOGFILE"
> echo "[Run $run] Duration: ${DURATION}s"
> done
>
> echo "All runs complete. Results saved to $DIR/$LOGFILE."
next prev parent reply other threads:[~2025-06-09 19:59 UTC|newest]
Thread overview: 70+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-06-06 23:37 [PATCH v1 0/8] fuse: use iomap for buffered writes + writeback Joanne Koong
2025-06-06 23:37 ` [PATCH v1 1/8] iomap: move buffered io bio logic into separate file Joanne Koong
2025-06-08 19:17 ` Anuj gupta
2025-06-09 4:44 ` Christoph Hellwig
2025-06-09 20:01 ` Joanne Koong
2025-06-06 23:37 ` [PATCH v1 2/8] iomap: add IOMAP_IN_MEM iomap type Joanne Koong
2025-06-09 4:45 ` Christoph Hellwig
2025-06-09 21:45 ` Joanne Koong
2025-06-10 3:39 ` Christoph Hellwig
2025-06-10 13:27 ` Christoph Hellwig
2025-06-10 20:13 ` Joanne Koong
2025-06-11 4:04 ` Christoph Hellwig
2025-06-11 6:00 ` Joanne Koong
2025-06-11 6:08 ` Christoph Hellwig
2025-06-11 18:33 ` Joanne Koong
2025-06-11 18:50 ` Darrick J. Wong
2025-06-11 23:08 ` Joanne Koong
2025-06-12 4:42 ` Christoph Hellwig
2025-06-09 16:24 ` Darrick J. Wong
2025-06-09 21:28 ` Joanne Koong
2025-06-12 3:53 ` Darrick J. Wong
2025-06-06 23:37 ` [PATCH v1 3/8] iomap: add buffered write support for IOMAP_IN_MEM iomaps Joanne Koong
2025-06-09 4:56 ` Christoph Hellwig
2025-06-09 22:45 ` Joanne Koong
2025-06-10 3:44 ` Christoph Hellwig
2025-06-09 16:38 ` Darrick J. Wong
2025-06-09 22:03 ` Joanne Koong
2025-06-12 3:54 ` Darrick J. Wong
2025-06-06 23:37 ` [PATCH v1 4/8] iomap: add writepages " Joanne Koong
2025-06-09 5:32 ` Christoph Hellwig
2025-06-09 16:57 ` Darrick J. Wong
2025-06-10 3:49 ` Christoph Hellwig
2025-06-12 3:56 ` Darrick J. Wong
2025-06-09 23:15 ` Joanne Koong
2025-06-10 3:58 ` Christoph Hellwig
2025-06-10 18:23 ` Joanne Koong
2025-06-10 18:58 ` Joanne Koong
2025-06-11 4:01 ` Christoph Hellwig
2025-06-06 23:38 ` [PATCH v1 5/8] iomap: add iomap_writeback_dirty_folio() Joanne Koong
2025-06-09 4:51 ` Christoph Hellwig
2025-06-09 17:14 ` Darrick J. Wong
2025-06-09 23:54 ` Joanne Koong
2025-06-10 3:59 ` Christoph Hellwig
2025-06-11 4:34 ` Matthew Wilcox
2025-06-18 4:47 ` does fuse need ->launder_folios, was: " Christoph Hellwig
2025-06-18 12:17 ` Jeff Layton
2025-06-20 18:15 ` Matthew Wilcox
2025-06-25 5:26 ` Joanne Koong
2025-06-25 6:26 ` Christoph Hellwig
2025-06-25 16:44 ` Joanne Koong
2025-07-01 5:41 ` Darrick J. Wong
2025-07-02 21:36 ` Joanne Koong
2025-07-02 21:47 ` Joanne Koong
2025-07-01 6:23 ` Miklos Szeredi
2025-06-09 23:30 ` Joanne Koong
2025-06-10 4:03 ` Christoph Hellwig
2025-06-06 23:38 ` [PATCH v1 6/8] fuse: use iomap for buffered writes Joanne Koong
2025-06-06 23:38 ` [PATCH v1 7/8] fuse: use iomap for writeback Joanne Koong
2025-06-08 19:20 ` Anuj gupta
2025-06-06 23:38 ` [PATCH v1 8/8] fuse: use iomap for folio laundering Joanne Koong
2025-06-08 19:12 ` [PATCH v1 0/8] fuse: use iomap for buffered writes + writeback Anuj gupta
2025-06-09 19:59 ` Joanne Koong [this message]
2025-06-14 14:22 ` Anuj gupta
2025-06-09 4:40 ` Christoph Hellwig
2025-06-09 12:38 ` Anuj gupta
2025-06-09 19:47 ` Joanne Koong
2025-06-10 4:04 ` Christoph Hellwig
2025-06-10 0:47 ` Dave Chinner
2025-06-10 4:06 ` Christoph Hellwig
2025-06-10 20:33 ` 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=CAJnrk1Z2QSVbALJpt2-nXjg+gFDH2mdnXUDTMEkyhxcvwh8B5A@mail.gmail.com \
--to=joannelkoong@gmail.com \
--cc=anuj1072538@gmail.com \
--cc=anuj20.g@samsung.com \
--cc=bernd.schubert@fastmail.fm \
--cc=brauner@kernel.org \
--cc=djwong@kernel.org \
--cc=kernel-team@meta.com \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-xfs@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;
as well as URLs for NNTP newsgroup(s).