f2fs: introduce sysfs readdir_ra to readahead inode block in readdir
authorSheng Yong <shengyong1@huawei.com>
Wed, 22 Nov 2017 10:23:38 +0000 (18:23 +0800)
committerJaegeuk Kim <jaegeuk@kernel.org>
Sat, 27 Jan 2018 21:29:03 +0000 (13:29 -0800)
commitb61cf217182b9dddc985e4d903dfd7f311297c51
treeedd0c06b39b4d26b8f127bea10ea076053342c4e
parent44ed9b2d125cc60e1d9c719bfcf78108f4fd9f3c
f2fs: introduce sysfs readdir_ra to readahead inode block in readdir

This patch introduces a sysfs interface readdir_ra to enable/disable
readaheading inode block in f2fs_readdir. When readdir_ra is enabled,
it improves the performance of "readdir + stat".

For 300,000 files:
time find /data/test > /dev/null
disable readdir_ra: 1m25.69s real  0m01.94s user  0m50.80s system
enable  readdir_ra: 0m18.55s real  0m00.44s user  0m15.39s system

Signed-off-by: Sheng Yong <shengyong1@huawei.com>
Reviewed-by: Chao Yu <yuchao0@huawei.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Documentation/ABI/testing/sysfs-fs-f2fs
fs/f2fs/dir.c
fs/f2fs/f2fs.h
fs/f2fs/sysfs.c