All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Pankaj Raghav (Samsung)" <kernel@pankajraghav.com>
To: Brian Foster <bfoster@redhat.com>,
	Kent Overstreet <kent.overstreet@linux.dev>
Cc: linux-bcachefs@vger.kernel.org, willy@infradead.org,
	linux-kernel@vger.kernel.org,
	Pankaj Raghav <p.raghav@samsung.com>
Subject: [PATCH 0/2] improve buffered write performance with fgf order hint
Date: Fri, 14 Jun 2024 10:50:29 +0000	[thread overview]
Message-ID: <20240614105031.57032-1-kernel@pankajraghav.com> (raw)

From: Pankaj Raghav <p.raghav@samsung.com>

Filesystems that support large folios can set the fgf order before
buffered write(see XFS iomap_write_begin()) that can provide as a hint
to page cache to allocate large folios, if possible.

The first patch is a minor cleanup.
The second patch sets fgf order before starting the buffered write.

I tested the performance on Samsung SSD 990 pro on a system with 64GB
RAM as follows:

$ bcachefs format -f /dev/nvme0n1;
$ mount -t bcachefs /dev/nvme0n1 /mnt
$ fio --name=bcachefs --filename=/mnt/test  --size=100G \
    --ioengine=io_uring --iodepth=16 --rw=write --bs=128k

I measured the BW(MB/s) across three runs on 6.10-rc3:
Before patches: 2730
After patches: 3430 (1.25x boost)

With -o no_data_io mount option:
Before patches: 2920
After patches: 4630 (1.5x boost)

I was not able to test the patches with ktest due to some issue with
debian(some broken package issue). Maybe Kent can run it in his CI while
I try to fix ktest locally?

Pankaj Raghav (2):
  bcachefs: use FGP_WRITEBEGIN instead of combining individual flags
  bcachefs: set fgf order hint before starting a buffered write

 fs/bcachefs/fs-io-buffered.c | 9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)


base-commit: 03d44168cbd7fc57d5de56a3730427db758fc7f6
-- 
2.44.1


             reply	other threads:[~2024-06-14 10:50 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-06-14 10:50 Pankaj Raghav (Samsung) [this message]
2024-06-14 10:50 ` [PATCH 1/2] bcachefs: use FGP_WRITEBEGIN instead of combining individual flags Pankaj Raghav (Samsung)
2024-06-14 14:36   ` Matthew Wilcox
2024-06-14 16:22     ` Pankaj Raghav (Samsung)
2024-06-14 10:50 ` [PATCH 2/2] bcachefs: set fgf order hint before starting a buffered write Pankaj Raghav (Samsung)
2024-06-14 14:50 ` [PATCH 0/2] improve buffered write performance with fgf order hint Kent Overstreet

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=20240614105031.57032-1-kernel@pankajraghav.com \
    --to=kernel@pankajraghav.com \
    --cc=bfoster@redhat.com \
    --cc=kent.overstreet@linux.dev \
    --cc=linux-bcachefs@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=p.raghav@samsung.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.