diff options
author | 2023-03-07 09:47:20 -0700 | |
---|---|---|
committer | 2023-04-03 07:14:20 -0600 | |
commit | d4755e15386c38e4ae532ace5acc29fbfaee42e7 (patch) | |
tree | 1edc85467c3ea9ede5ee2d18b7021d3c0588f968 /tools/perf/scripts/python/export-to-postgresql.py | |
parent | fs: add FMODE_DIO_PARALLEL_WRITE flag (diff) | |
download | wireguard-linux-d4755e15386c38e4ae532ace5acc29fbfaee42e7.tar.xz wireguard-linux-d4755e15386c38e4ae532ace5acc29fbfaee42e7.zip |
io_uring: avoid hashing O_DIRECT writes if the filesystem doesn't need it
io_uring hashes writes to a given file/inode so that it can serialize
them. This is useful if the file system needs exclusive access to the
file to perform the write, as otherwise we end up with a ton of io-wq
threads trying to lock the inode at the same time. This can cause
excessive system time.
But if the file system has flagged that it supports parallel O_DIRECT
writes, then there's no need to serialize the writes. Check for that
through FMODE_DIO_PARALLEL_WRITE and don't hash it if we don't need to.
In a basic test of 8 threads writing to a file on XFS on a gen2 Optane,
with each thread writing in 4k chunks, it improves performance from
~1350K IOPS (or ~5290MiB/sec) to ~1410K IOPS (or ~5500MiB/sec).
Reviewed-by: Darrick J. Wong <djwong@kernel.org>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'tools/perf/scripts/python/export-to-postgresql.py')
0 files changed, 0 insertions, 0 deletions