block: skip redundant flush for O_DSYNC direct writes - #1130
Open
blktests-ci[bot] wants to merge 1 commit into
Open
block: skip redundant flush for O_DSYNC direct writes#1130blktests-ci[bot] wants to merge 1 commit into
blktests-ci[bot] wants to merge 1 commit into
Conversation
Author
|
Upstream branch: f5bbbfe |
blktests-ci
Bot
force-pushed
the
linus-master_base
branch
from
August 12, 2026 18:56
ea2c39d to
4082a30
Compare
Author
|
Upstream branch: 3d6d817 |
blktests-ci
Bot
force-pushed
the
series/1144736=>linus-master
branch
from
August 12, 2026 19:23
51f6171 to
d152057
Compare
blktests-ci
Bot
force-pushed
the
linus-master_base
branch
from
August 13, 2026 19:18
4082a30 to
36bd7eb
Compare
Author
|
Upstream branch: 3aa1dca |
blktests-ci
Bot
force-pushed
the
series/1144736=>linus-master
branch
from
August 13, 2026 19:26
d152057 to
50b301b
Compare
blktests-ci
Bot
force-pushed
the
linus-master_base
branch
2 times, most recently
from
August 16, 2026 18:34
d89ab11 to
fdba928
Compare
Author
|
Upstream branch: fd923b3 |
blktests-ci
Bot
force-pushed
the
series/1144736=>linus-master
branch
from
August 16, 2026 19:39
50b301b to
1599926
Compare
blktests-ci
Bot
force-pushed
the
linus-master_base
branch
from
August 17, 2026 14:10
fdba928 to
60442a3
Compare
Author
|
Upstream branch: 8d3ae59 |
blktests-ci
Bot
force-pushed
the
series/1144736=>linus-master
branch
from
August 17, 2026 16:25
1599926 to
995b260
Compare
blktests-ci
Bot
force-pushed
the
linus-master_base
branch
from
August 19, 2026 05:25
60442a3 to
3df366e
Compare
For an O_DIRECT | O_DSYNC write to a block device, dio_bio_write_op()
adds REQ_FUA to the bio, so the data is durable when the direct-IO
returns. blkdev_write_iter() then falls through to
generic_write_sync(), which for O_DSYNC turns into an additional
REQ_PREFLUSH. That flush is redundant: the FUA write already made
the data persistent.
Skip generic_write_sync() when the direct-IO path already provided
durability via FUA. The buffered and direct_write_fallback() paths
are unchanged.
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>
Author
|
Upstream branch: bd5f485 |
blktests-ci
Bot
force-pushed
the
series/1144736=>linus-master
branch
from
August 19, 2026 05:34
995b260 to
015445a
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Pull request for series with
subject: block: skip redundant flush for O_DSYNC direct writes
version: 1
url: https://patchwork.kernel.org/project/linux-block/list/?series=1144736