linux/fs/f2fs
Daeho Jeong 261eeb9c15 f2fs: introduce checkpoint_merge mount option
We've added a new mount options, "checkpoint_merge" and "nocheckpoint_merge",
which creates a kernel daemon and makes it to merge concurrent checkpoint
requests as much as possible to eliminate redundant checkpoint issues. Plus,
we can eliminate the sluggish issue caused by slow checkpoint operation
when the checkpoint is done in a process context in a cgroup having
low i/o budget and cpu shares. To make this do better, we set the
default i/o priority of the kernel daemon to "3", to give one higher
priority than other kernel threads. The below verification result
explains this.
The basic idea has come from https://opensource.samsung.com.

[Verification]
Android Pixel Device(ARM64, 7GB RAM, 256GB UFS)
Create two I/O cgroups (fg w/ weight 100, bg w/ wight 20)
Set "strict_guarantees" to "1" in BFQ tunables

In "fg" cgroup,
- thread A => trigger 1000 checkpoint operations
  "for i in `seq 1 1000`; do touch test_dir1/file; fsync test_dir1;
   done"
- thread B => gererating async. I/O
  "fio --rw=write --numjobs=1 --bs=128k --runtime=3600 --time_based=1
       --filename=test_img --name=test"

In "bg" cgroup,
- thread C => trigger repeated checkpoint operations
  "echo $$ > /dev/blkio/bg/tasks; while true; do touch test_dir2/file;
   fsync test_dir2; done"

We've measured thread A's execution time.

[ w/o patch ]
Elapsed Time: Avg. 68 seconds
[ w/  patch ]
Elapsed Time: Avg. 48 seconds

Reported-by: kernel test robot <lkp@intel.com>
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
[Jaegeuk Kim: fix the return value in f2fs_start_ckpt_thread, reported by Dan]
Signed-off-by: Daeho Jeong <daehojeong@google.com>
Signed-off-by: Sungjong Seo <sj1557.seo@samsung.com>
Reviewed-by: Chao Yu <yuchao0@huawei.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
2021-02-03 13:03:06 -08:00
..
acl.c f2fs: enhance to update i_mode and acl atomically in f2fs_setattr() 2021-01-27 15:20:00 -08:00
acl.h f2fs: Use the correct style for SPDX License Identifier 2020-05-08 06:55:55 -07:00
checkpoint.c f2fs: introduce checkpoint_merge mount option 2021-02-03 13:03:06 -08:00
compress.c f2fs: compress: fix potential deadlock 2021-01-27 15:20:05 -08:00
compress.h f2fs: compress: fix compression chksum 2020-12-10 09:13:53 -08:00
data.c f2fs: fix a wrong condition in __submit_bio 2021-02-02 09:14:27 -08:00
debug.c f2fs: introduce checkpoint_merge mount option 2021-02-03 13:03:06 -08:00
dir.c f2fs-for-5.11-rc1 2020-12-17 11:18:00 -08:00
extent_cache.c f2fs: support 64-bits key in f2fs rb-tree node entry 2020-09-10 14:03:30 -07:00
f2fs.h f2fs: introduce checkpoint_merge mount option 2021-02-03 13:03:06 -08:00
file.c f2fs: relocate inline conversion from mmap() to mkwrite() 2021-02-02 09:14:27 -08:00
gc.c f2fs: trival cleanup in move_data_block() 2021-01-27 15:20:03 -08:00
gc.h f2fs: support age threshold based garbage collection 2020-09-11 11:11:15 -07:00
hash.c f2fs: Handle casefolding with Encryption 2020-12-02 22:00:21 -08:00
inline.c f2fs: fix to avoid inconsistent quota data 2021-02-01 14:32:51 -08:00
inode.c f2fs: compress: support chksum 2020-12-02 22:00:22 -08:00
Kconfig f2fs: deprecate f2fs_trace_io 2021-01-27 15:20:07 -08:00
Makefile f2fs: deprecate f2fs_trace_io 2021-01-27 15:20:07 -08:00
namei.c f2fs: fix to set/clear I_LINKABLE under i_lock 2021-01-27 15:20:05 -08:00
node.c f2fs: deprecate f2fs_trace_io 2021-01-27 15:20:07 -08:00
node.h f2fs: avoid race condition for shrinker count 2020-12-03 00:59:26 -08:00
recovery.c f2fs: change to use rwsem for cp_mutex 2020-12-02 22:00:21 -08:00
segment.c f2fs: deprecate f2fs_trace_io 2021-01-27 15:20:07 -08:00
segment.h f2fs: handle unallocated section and zone on pinned/atgc 2021-01-27 15:19:59 -08:00
shrinker.c f2fs: avoid race condition for shrinker count 2020-12-03 00:59:26 -08:00
super.c f2fs: introduce checkpoint_merge mount option 2021-02-03 13:03:06 -08:00
sysfs.c f2fs: introduce sb_status sysfs node 2021-01-27 15:20:06 -08:00
verity.c mm/readahead: make page_cache_ra_unbounded take a readahead_control 2020-10-16 11:11:16 -07:00
xattr.c f2fs: remove unnecessary initialization in xattr.c 2021-02-01 14:32:51 -08:00
xattr.h f2fs: code cleanup by removing ifdef macro surrounding 2020-05-26 18:56:10 -07:00