aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/scripts/Makefile.thinlto
diff options
context:
space:
mode:
authorZhenxian Ma <mzx199711@gmail.com>2026-08-15 17:06:52 +0800
committerJens Axboe <axboe@kernel.dk>2026-09-13 23:33:05 -0600
commitbec7d36a6514153ded6ffe1323ab14912ced42df (patch)
tree6b43a36a1c7fadff3674e39136b95c82a33b65ee /scripts/Makefile.thinlto
parentblock: improve aligning down bios in bio_iov_iter_bounce_write (diff)
block: skip redundant flush for O_DSYNC direct writes
For an O_DIRECT | O_DSYNC write, dio_bio_write_op() adds REQ_FUA to the bio, so the data is durable once the direct I/O returns. The unconditional generic_write_sync() in blkdev_write_iter() then issues a REQ_PREFLUSH that is redundant. Skip it when the direct path already provided durability via FUA. A need_sync flag, clear by default, is set only for buffered writes and for the buffered fallback after a partial direct write. Measured on a Seagate ST20000NM007D (20 TB, 7200 rpm, fua=1, write_cache=write back), Linux v7.2.0-rc7, single-threaded pwrite() loop opening the raw block device with O_WRONLY | O_DIRECT | O_DSYNC, 4 KiB writes for 60 s: Sequential 4 KiB writes: baseline patched IOPS 119.7 7497.0 avg latency (us) 8357 133 p50 latency (us) 8346 127 p99 latency (us) 8368 395 p99.9 latency (us) 8728 569 Random 4 KiB writes (100 GiB span): baseline patched IOPS 156.1 666.4 avg latency (us) 6405 1500 p50 latency (us) 6186 1450 p99 latency (us) 16133 2285 p99.9 latency (us) 17250 9916 Signed-off-by: Zhenxian Ma <mzx199711@gmail.com> Signed-off-by: Zhenxian Ma <mazhenxian@xiaohongshu.com> Reviewed-by: Christoph Hellwig <hch@lst.de> Link: https://patch.msgid.link/f847707d772a9225460406b5aecba030d7209b05.1786782832.git.mzx199711@gmail.com Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'scripts/Makefile.thinlto')
0 files changed, 0 insertions, 0 deletions