]> git.baikalelectronics.ru Git - kernel.git/commit
f2fs: implement cgroup writeback support
authorYufen Yu <yuyufen@huawei.com>
Tue, 9 Jan 2018 11:33:39 +0000 (19:33 +0800)
committerJaegeuk Kim <jaegeuk@kernel.org>
Tue, 16 Jan 2018 23:40:01 +0000 (15:40 -0800)
commit5f0b619e8365d74574e877bbee357f0a5a96f82a
treef210806961bad512719f9e9d94cea6826a9e86c2
parent02585f435ec65313aa894877e3abee73bef60bcb
f2fs: implement cgroup writeback support

Cgroup writeback requires explicit support from the filesystem.
f2fs's data and node writeback IOs go through __write_data_page,
which sets fio for submiting IOs. So, we add io_wbc for fio,
associate bios with blkcg by invoking wbc_init_bio() and
account IOs issuing by wbc_account_io().
In addtion, f2fs_fill_super() is updated to set SB_I_CGROUPWB.

Meta writeback IOs is left alone by this patch and will always be
attributed to the root cgroup.

The results show that f2fs can throttle writeback nicely for
data writing and file creating.

Reviewed-by: Chao Yu <yuchao0@huawei.com>
Signed-off-by: Yufen Yu <yuyufen@huawei.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
fs/f2fs/data.c
fs/f2fs/f2fs.h
fs/f2fs/node.c
fs/f2fs/super.c