linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [RFC 0/2] iomap: Add support for subpage dirty state tracking to improve write performance
@ 2022-10-28  4:30 Ritesh Harjani (IBM)
  2022-10-28  4:30 ` [RFC 1/2] iomap: Change uptodate variable name to state Ritesh Harjani (IBM)
  2022-10-28  4:30 ` [RFC 2/2] iomap: Support subpage size dirty tracking to improve write performance Ritesh Harjani (IBM)
  0 siblings, 2 replies; 27+ messages in thread
From: Ritesh Harjani (IBM) @ 2022-10-28  4:30 UTC (permalink / raw)
  To: linux-xfs
  Cc: linux-fsdevel, Christoph Hellwig, Darrick J . Wong,
	Matthew Wilcox, Ritesh Harjani (IBM)

Hello,

Please find the RFC patchset which adds support for iomap subpage dirty state 
tracking which improves write performance and should reduce the write amplification 
on platforms with smaller filesystem blocksize compared to pagesize.
E.g. On Power with 64k default pagesize and with 4k XFS filesystem blocksize.

I have done some minimal fsstress and fstests testing using this patchset 
and haven't noticed any issues as such. Posting this RFC to get some 
initial comments/thoughts on the patch. 
I will run full fstests with XFS if this RFC looks good. 

From review perspective, it will be helpful if one can also review the error 
handling path. I wasn't sure on whether we need to clear the dirty state bitmap 
of blocks within a folio or not in iomap_writepage_map(). I don't clear that,
since AFAIU, the error in that function is due to failed ->map_blocks() function
which has nothing to do with tracking subpage dirty state of a block within
folio. But please let me know your thoughts on this or other error handling path.


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

<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 there
   database workload performance by around ~83% (with XFS on Power)


Note: I did come across an older RFC around the same logic to track subpage
dirty tracking here [1]. But it seems no one pursued it after iomap received
folio changes update. 

[1]: https://lore.kernel.org/linux-xfs/20200821123306.1658495-1-yukuai3@huawei.com/#t

Ritesh Harjani (IBM) (2):
  iomap: Change uptodate variable name to state
  iomap: Support subpage size dirty tracking to improve write performance

 fs/iomap/buffered-io.c | 79 ++++++++++++++++++++++++++++++++++--------
 1 file changed, 64 insertions(+), 15 deletions(-)

-- 
2.37.3


^ permalink raw reply	[flat|nested] 27+ messages in thread

end of thread, other threads:[~2022-11-07 13:04 UTC | newest]

Thread overview: 27+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-10-28  4:30 [RFC 0/2] iomap: Add support for subpage dirty state tracking to improve write performance Ritesh Harjani (IBM)
2022-10-28  4:30 ` [RFC 1/2] iomap: Change uptodate variable name to state Ritesh Harjani (IBM)
2022-10-28 16:31   ` Darrick J. Wong
2022-10-29  3:09     ` Ritesh Harjani (IBM)
2022-10-28  4:30 ` [RFC 2/2] iomap: Support subpage size dirty tracking to improve write performance Ritesh Harjani (IBM)
2022-10-28 12:42   ` Matthew Wilcox
2022-10-29  3:05     ` Ritesh Harjani (IBM)
2022-10-28 17:01   ` Darrick J. Wong
2022-10-28 18:15     ` Matthew Wilcox
2022-10-29  3:25     ` Ritesh Harjani (IBM)
2022-10-28 21:04   ` Dave Chinner
2022-10-30  3:27     ` Ritesh Harjani (IBM)
2022-10-30 22:31       ` Dave Chinner
2022-10-31  3:43     ` Matthew Wilcox
2022-10-31  7:08       ` Dave Chinner
2022-10-31 10:27         ` Matthew Wilcox
2022-11-02  8:57           ` Christoph Hellwig
2022-11-03  0:38             ` Dave Chinner
2022-11-02  9:03       ` Christoph Hellwig
2022-11-02 17:35         ` Darrick J. Wong
2022-11-04  7:27           ` Christoph Hellwig
2022-11-04 14:15             ` Ritesh Harjani (IBM)
2022-11-03 14:51       ` David Howells
2022-11-04  7:30         ` Christoph Hellwig
2022-11-07 13:03         ` David Howells
2022-11-04 11:28       ` Ritesh Harjani (IBM)
2022-11-03 14:12     ` David Howells

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).