Skip to content

RFC blkdev: flush generation optimization

Dmitry Monakhov linux-ext4 lkml 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 RFC Latest2 patches 3 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2blkdev: add flush generation counterblock/blk-core.c block/blk-flush.c include/linux/blkdev.h+4 -13 replies
2/2ext4: Add fdatasync scalability optimizationfs/ext4/ext4.h fs/ext4/ext4_jbd2.h fs/ext4/fsync.c +2 more+24 -80 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 0/2] [RFC] blkdev: flush generation optimization

Some filesystems try to optimize barrier flushes by maintaining fs-specific generation counters, but if we introduce generic flush generation counter for block device filesystems may use it for fdatasync(2) optimization. Optimization should works if userspace performs mutli-threaded IO with a lot of fdatasync() Here are graphs for a test where each task performs random buffered writes to dedicated file and performs fdatasync(2) after each operation.

Axis: x=nr_tasks, y=write_iops

# Chunk server simulation workload
# Files 'chunk.$NUM_JOB.0' should be precreated before the test #
[global]
bs=4k
ioengine=psync
filesize=64M
size=8G
direct=0
runtime=30
directory=/mnt
fdatasync=1
group_reporting=1

[chunk]
overwrite=1
new_group=1
write_bw_log=bw.log
rw=randwrite
numjobs=${NUM_JOBS}
fsync=1
stonewall

TOC:
0001 blkdev: add flush generation counter
0002 ext4: Add fdatasync scalability optimization