summaryrefslogtreecommitdiffstats
path: root/fs/f2fs/node.c
diff options
context:
space:
mode:
authorWeichao Guo2016-09-19 23:03:27 +0200
committerJaegeuk Kim2016-10-01 02:34:23 +0200
commit5b7a487cf32d3a266fea83d590d3226b5ad817a7 (patch)
treeb94819fd074d9e312a10f0fd2259e9295b008418 /fs/f2fs/node.c
parentf2fs: introduce cp_lock to protect updating of ckpt_flags (diff)
downloadkernel-qcow2-linux-5b7a487cf32d3a266fea83d590d3226b5ad817a7.tar.gz
kernel-qcow2-linux-5b7a487cf32d3a266fea83d590d3226b5ad817a7.tar.xz
kernel-qcow2-linux-5b7a487cf32d3a266fea83d590d3226b5ad817a7.zip
f2fs: add customized migrate_page callback
This patch improves the migration of dirty pages and allows migrating atomic written pages that F2FS uses in Page Cache. Instead of the fallback releasing page path, it provides better performance for memory compaction, CMA and other users of memory page migrating. For dirty pages, there is no need to write back first when migrating. For an atomic written page before committing, we can migrate the page and update the related 'inmem_pages' list at the same time. Signed-off-by: Weichao Guo <guoweichao@huawei.com> Reviewed-by: Chao Yu <yuchao0@huawei.com> [Jaegeuk Kim: fix some coding style] Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Diffstat (limited to 'fs/f2fs/node.c')
-rw-r--r--fs/f2fs/node.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/fs/f2fs/node.c b/fs/f2fs/node.c
index 2322a8e817bf..55c22a9c4f9e 100644
--- a/fs/f2fs/node.c
+++ b/fs/f2fs/node.c
@@ -1670,6 +1670,9 @@ const struct address_space_operations f2fs_node_aops = {
.set_page_dirty = f2fs_set_node_page_dirty,
.invalidatepage = f2fs_invalidate_page,
.releasepage = f2fs_release_page,
+#ifdef CONFIG_MIGRATION
+ .migratepage = f2fs_migrate_page,
+#endif
};
static struct free_nid *__lookup_free_nid_list(struct f2fs_nm_info *nm_i,