]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commit
f2fs: merge pages with the same sync_mode flag
authorFan Li <fanofcode.li@samsung.com>
Mon, 9 Dec 2013 08:09:00 +0000 (16:09 +0800)
committerJaegeuk Kim <jaegeuk.kim@samsung.com>
Mon, 23 Dec 2013 01:18:06 +0000 (10:18 +0900)
commit63a0b7cb33d85aeb0df39b984c08e234db4925d1
tree75de6dbf2311e606124221d11344bc3ad8e2ebfa
parent6bacf52fb58aeb3e89d9a62970b85a5570aa8ace
f2fs: merge pages with the same sync_mode flag

Previously f2fs submits most of write requests using WRITE_SYNC, but f2fs_write_data_pages
submits last write requests by sync_mode flags callers pass.

This causes a performance problem since continuous pages with different sync flags
can't be merged in cfq IO scheduler(thanks yu chao for pointing it out), and synchronous
requests often take more time.

This patch makes the following modifies to DATA writebacks:

1. every page will be written back using the sync mode caller pass.
2. only pages with the same sync mode can be merged in one bio request.

These changes are restricted to DATA pages.Other types of writebacks are modified
To remain synchronous.

In my test with tiotest, f2fs sequence write performance is improved by about 7%-10% ,
and this patch has no obvious impact on other performance tests.

Signed-off-by: Fan Li <fanofcode.li@samsung.com>
Signed-off-by: Jaegeuk Kim <jaegeuk.kim@samsung.com>
fs/f2fs/data.c
fs/f2fs/f2fs.h
fs/f2fs/gc.c
fs/f2fs/segment.c