linux/fs/ext4
Jan Kara 8cd115bdda ext4: Optimize ext4 DIO overwrites
Currently we start transaction for mapping every extent for writing
using direct IO. This is unnecessary when we know we are overwriting
already allocated blocks and the overhead of starting a transaction can
be significant especially for multithreaded workloads doing small writes.
Use iomap operations that avoid starting a transaction for direct IO
overwrites.

This improves throughput of 4k random writes - fio jobfile:
[global]
rw=randrw
norandommap=1
invalidate=0
bs=4k
numjobs=16
time_based=1
ramp_time=30
runtime=120
group_reporting=1
ioengine=psync
direct=1
size=16G
filename=file1.0.0:file1.0.1:file1.0.2:file1.0.3:file1.0.4:file1.0.5:file1.0.6:file1.0.7:file1.0.8:file1.0.9:file1.0.10:file1.0.11:file1.0.12:file1.0.13:file1.0.14:file1.0.15:file1.0.16:file1.0.17:file1.0.18:file1.0.19:file1.0.20:file1.0.21:file1.0.22:file1.0.23:file1.0.24:file1.0.25:file1.0.26:file1.0.27:file1.0.28:file1.0.29:file1.0.30:file1.0.31
file_service_type=random
nrfiles=32

from 3018MB/s to 4059MB/s in my test VM running test against simulated
pmem device (note that before iomap conversion, this workload was able
to achieve 3708MB/s because old direct IO path avoided transaction start
for overwrites as well). For dax, the win is even larger improving
throughput from 3042MB/s to 4311MB/s.

Reported-by: Dan Williams <dan.j.williams@intel.com>
Signed-off-by: Jan Kara <jack@suse.cz>
Link: https://lore.kernel.org/r/20191218174433.19380-1-jack@suse.cz
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2019-12-26 11:57:18 -05:00
..
acl.c ext4: compare old and new mode before setting update_mode flag 2018-12-10 00:22:38 -05:00
acl.h ext4: fix up remaining files with SPDX cleanups 2017-12-17 22:00:59 -05:00
balloc.c ext4: simulate various I/O and checksum errors when reading metadata 2019-12-26 11:28:31 -05:00
bitmap.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
block_validity.c ext4: use RCU API in debug_print_tree 2019-12-15 21:41:04 -05:00
dir.c ext4: optimize __ext4_check_dir_entry() 2019-12-14 17:23:14 -05:00
ext4.h ext4: Optimize ext4 DIO overwrites 2019-12-26 11:57:18 -05:00
ext4_extents.h ext4: adjust reserved cluster count when removing extents 2018-10-01 14:25:08 -04:00
ext4_jbd2.c ext4: save the error code which triggered an ext4_error() in the superblock 2019-12-26 11:28:23 -05:00
ext4_jbd2.h ext4: Reserve revoke credits for freed blocks 2019-11-05 16:00:49 -05:00
extents.c ext4: save the error code which triggered an ext4_error() in the superblock 2019-12-26 11:28:23 -05:00
extents_status.c ext4: use percpu_counters for extent_status cache hits/misses 2019-08-28 11:19:23 -04:00
extents_status.h ext4: use percpu_counters for extent_status cache hits/misses 2019-08-28 11:19:23 -04:00
file.c ext4: Optimize ext4 DIO overwrites 2019-12-26 11:57:18 -05:00
fsmap.c ext4: fix miscellaneous sparse warnings 2019-05-12 04:49:47 -04:00
fsmap.h ext4: fix up remaining files with SPDX cleanups 2017-12-17 22:00:59 -05:00
fsync.c ext4: update ext4_sync_file() to not use __generic_file_fsync() 2019-11-05 11:31:40 -05:00
hash.c ext4: fix kernel oops caused by spurious casefold flag 2019-09-03 01:43:17 -04:00
ialloc.c ext4: simulate various I/O and checksum errors when reading metadata 2019-12-26 11:28:31 -05:00
indirect.c ext4: Reserve revoke credits for freed blocks 2019-11-05 16:00:49 -05:00
inline.c ext4: save the error code which triggered an ext4_error() in the superblock 2019-12-26 11:28:23 -05:00
inode-test.c fs/ext4/inode-test: Fix inode test on 32 bit platforms. 2019-12-09 11:15:44 -07:00
inode.c ext4: Optimize ext4 DIO overwrites 2019-12-26 11:57:18 -05:00
ioctl.c fs: compat_ioctl: move FITRIM emulation into file systems 2019-10-23 17:23:46 +02:00
Kconfig ext4: add kunit test for decoding extended timestamps 2019-10-23 10:28:23 -06:00
Makefile ext4: add kunit test for decoding extended timestamps 2019-10-23 10:28:23 -06:00
mballoc.c ext4: save the error code which triggered an ext4_error() in the superblock 2019-12-26 11:28:23 -05:00
mballoc.h ext4: fix up remaining files with SPDX cleanups 2017-12-17 22:00:59 -05:00
migrate.c ext4: Reserve revoke credits for freed blocks 2019-11-05 16:00:49 -05:00
mmp.c ext4: save the error code which triggered an ext4_error() in the superblock 2019-12-26 11:28:23 -05:00
move_extent.c ext4: use jbd2_inode dirty range scoping 2019-06-20 17:26:26 -04:00
namei.c ext4: simulate various I/O and checksum errors when reading metadata 2019-12-26 11:28:31 -05:00
page-io.c ext4: bio_alloc with __GFP_DIRECT_RECLAIM never fails 2019-11-14 22:19:11 -05:00
readpage.c ext4: bio_alloc with __GFP_DIRECT_RECLAIM never fails 2019-11-14 22:19:11 -05:00
resize.c ext4: Reserve revoke credits for freed blocks 2019-11-05 16:00:49 -05:00
super.c ext4: save the error code which triggered an ext4_error() in the superblock 2019-12-26 11:28:23 -05:00
symlink.c ext4: switch to fscrypt_get_symlink() 2018-01-11 22:10:40 -05:00
sysfs.c ext4: export information about first/last errors via /sys/fs/ext4/<dev> 2019-12-26 11:29:10 -05:00
truncate.h ext4: handle layout changes to pinned DAX mappings 2018-07-29 17:00:22 -04:00
verity.c ext4: add basic fs-verity support 2019-08-12 19:33:50 -07:00
xattr.c ext4: save the error code which triggered an ext4_error() in the superblock 2019-12-26 11:28:23 -05:00
xattr.h ext4: add extra checks to ext4_xattr_block_get() 2018-03-30 20:04:11 -04:00
xattr_security.c ext4: use XATTR_CREATE in ext4_initxattrs() 2018-05-10 11:52:14 -04:00
xattr_trusted.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
xattr_user.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00