Skip to content

iomap: Add support for per-block dirty state to improve write performance

Ritesh Harjani (IBM) linux-fsdevel linux-xfs 11 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v11 Latest8 patches 13 repliesIn review
  2. v108 patches 8 repliesSuperseded
  3. v96 patches 37 repliesSuperseded
Earlier versions · 8
VersionPostedPatchesRepliesStatus
v85 patches21 repliesSuperseded
v76 patches16 repliesSuperseded
v65 patches5 repliesSuperseded
v5 RFC5 patches38 repliesSuperseded
v4 RFC3 patches3 repliesSuperseded
v3 RFC3 patches14 repliesSuperseded
v2 RFC3 patches19 repliesSuperseded
v1 RFC2 patches24 repliesSuperseded

Changes in v11 from the cover letter

===========
1. Dropped iomap_block_state enum. Thereby automatically addressing variables names like first_blk etc. in bitmap handling functions.

Patches in v11 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/8iomap: Rename iomap_page to iomap_folio_state and othersfs/iomap/buffered-io.c+72 -791 reply
2/8iomap: Drop ifs argument from iomap_set_range_uptodate()fs/iomap/buffered-io.c+33 -341 reply
3/8iomap: Add some uptodate state handling helpers for ifs state bitmapfs/iomap/buffered-io.c+20 -81 reply
4/8iomap: Fix possible overflow condition in iomap_write_delalloc_scanfs/iomap/buffered-io.c+1 -11 reply
5/8iomap: Use iomap_punch_t typedeffs/iomap/buffered-io.c+4 -51 reply
6/8iomap: Refactor iomap_write_delalloc_punch() function outfs/iomap/buffered-io.c+33 -200 replies
7/8iomap: Allocate ifs in ->write_begin() earlyfs/iomap/buffered-io.c+11 -20 replies
8/8iomap: Add per-block dirty state tracking to improve performancefs/gfs2/aops.c fs/iomap/buffered-io.c fs/xfs/xfs_aops.c +2 more+142 -148 replies

Reviews trailers per patch

All 8 patches have a Reviewed-by or Acked-by.

PatchChristoph HellwigDarrick J. Wong
1/8R-b R-b
2/8R-b R-b
3/8R-b R-b
4/8R-b
5/8R-b
6/8R-b R-b
7/8R-b R-b
8/8R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v11 thread

Cover letter [PATCHv11 0/8] iomap: Add support for per-block dirty state to improve write performance

Hello All,

Please find PATCHv11 which adds per-block dirty tracking to iomap. As discussed earlier this is required to improve write performance and reduce write amplification for cases where either blocksize is less than pagesize (such as Power platform with 64k pagesize) or when we have a large folio (such as xfs which currently supports large folio).

Thanks everyone for helping with reviews and suggestions.

v10 -> v11:
===========
1. Dropped iomap_block_state enum. Thereby automatically addressing variables names like first_blk etc. in bitmap handling functions.

Testing of v11:
===============
1. I have done fstests testing of v11 on my setup for x86 (1k & 4k bs), arm (4k bs) and Power (4k bs) with xfstests. I haven't found any new failures as such in my testing so far with xfstests.
2. I have also done some random read/write testing using fio & haven't observed any performance issues in my testing so far.

<Perf data copy paste from previous version>
=============================================
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)

Ritesh Harjani (IBM) (8):
iomap: Rename iomap_page to iomap_folio_state and others
iomap: Drop ifs argument from iomap_set_range_uptodate()
iomap: Add some uptodate state handling helpers for ifs state bitmap
iomap: Fix possible overflow condition in iomap_write_delalloc_scan
iomap: Use iomap_punch_t typedef
iomap: Refactor iomap_write_delalloc_punch() function out
iomap: Allocate ifs in ->write_begin() early
iomap: Add per-block dirty state tracking to improve performance

 fs/gfs2/aops.c         |   2 +-
 fs/iomap/buffered-io.c | 402 ++++++++++++++++++++++++++++-------------
 fs/xfs/xfs_aops.c      |   2 +-
 fs/zonefs/file.c       |   2 +-
 include/linux/iomap.h  |   1 +
 5 files changed, 281 insertions(+), 128 deletions(-)

--
2.40.1