linux/fs/zonefs
Ritesh Harjani (IBM) 4ce02c6797 iomap: Add per-block dirty state tracking to improve performance
When filesystem blocksize is less than folio size (either with
mapping_large_folio_support() or with blocksize < pagesize) and when the
folio is uptodate in pagecache, then even a byte write can cause
an entire folio to be written to disk during writeback. This happens
because we currently don't have a mechanism to track per-block dirty
state within struct iomap_folio_state. We currently only track uptodate
state.

This patch implements support for tracking per-block dirty state in
iomap_folio_state->state bitmap. This should help improve the filesystem
write performance and help reduce write amplification.

Performance testing of below fio workload reveals ~16x performance
improvement using nvme with XFS (4k blocksize) on Power (64K pagesize)
FIO reported write bw scores improved from around ~28 MBps to ~452 MBps.

1. <test_randwrite.fio>
[global]
	ioengine=psync
	rw=randwrite
	overwrite=1
	pre_read=1
	direct=0
	bs=4k
	size=1G
	dir=./
	numjobs=8
	fdatasync=1
	runtime=60
	iodepth=64
	group_reporting=1

[fio-run]

2. Also our internal performance team reported that this patch improves
   their database workload performance by around ~83% (with XFS on Power)

Reported-by: Aravinda Herle <araherle@in.ibm.com>
Reported-by: Brian Foster <bfoster@redhat.com>
Signed-off-by: Ritesh Harjani (IBM) <ritesh.list@gmail.com>
Reviewed-by: Darrick J. Wong <djwong@kernel.org>
2023-07-25 10:55:56 +05:30
..
file.c iomap: Add per-block dirty state tracking to improve performance 2023-07-25 10:55:56 +05:30
Kconfig zonefs: select CONFIG_CRC32 2021-01-04 09:06:42 +09:00
Makefile zonefs: Reorganize code 2023-01-23 09:25:50 +09:00
super.c for-6.5/block-2023-06-23 2023-06-26 12:47:20 -07:00
sysfs.c zonefs: make kobj_type structure constant 2023-02-13 08:03:48 +09:00
trace.h zonefs: Separate zone information from inode information 2023-01-23 09:25:51 +09:00
zonefs.h zonefs: use iomap for synchronous direct writes 2023-06-14 08:51:05 +09:00