diff options
author | 2020-10-12 17:06:05 +0800 | |
---|---|---|
committer | 2020-10-13 23:23:34 -0700 | |
commit | af4b6b8edf6aad73ac385e06196fefa46c23e038 (patch) | |
tree | 937f3c085ded24de145979ebccb368158135f7db /drivers/usb/cdns3/cdns3-debug.h | |
parent | f2fs: don't issue flush in f2fs_flush_device_cache() for nobarrier case (diff) | |
download | wireguard-linux-af4b6b8edf6aad73ac385e06196fefa46c23e038.tar.xz wireguard-linux-af4b6b8edf6aad73ac385e06196fefa46c23e038.zip |
f2fs: introduce check_swap_activate_fast()
check_swap_activate() will lookup block mapping via bmap() one by one, so
its performance is very bad, this patch introduces check_swap_activate_fast()
to use f2fs_fiemap() to boost this process, since f2fs_fiemap() will lookup
block mappings in batch, therefore, it can improve swapon()'s performance
significantly.
Note that this enhancement only works when page size is equal to f2fs' block
size.
Testcase: (backend device: zram)
- touch file
- pin & fallocate file to 8GB
- mkswap file
- swapon file
Before:
real 0m2.999s
user 0m0.000s
sys 0m2.980s
After:
real 0m0.081s
user 0m0.000s
sys 0m0.064s
Signed-off-by: Chao Yu <yuchao0@huawei.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Diffstat (limited to 'drivers/usb/cdns3/cdns3-debug.h')
0 files changed, 0 insertions, 0 deletions