aboutsummaryrefslogtreecommitdiffstats
path: root/fs/f2fs/node.c
diff options
context:
space:
mode:
authorJaegeuk Kim <jaegeuk@kernel.org>2014-12-09 09:08:59 -0500
committerJaegeuk Kim <jaegeuk@kernel.org>2015-01-09 20:02:22 -0500
commit1e84371ffeef451e8532e0cd04c2fe59ff10c514 (patch)
tree83cce972cf37a185f90c4231213c69f84881511f /fs/f2fs/node.c
parent70c640b1d6fd8484d0629b90052d6f6f738023fb (diff)
f2fs: change atomic and volatile write policies
This patch adds two new ioctls to release inmemory pages grabbed by atomic writes. o f2fs_ioc_abort_volatile_write - If transaction was failed, all the grabbed pages and data should be written. o f2fs_ioc_release_volatile_write - This is to enhance the performance of PERSIST mode in sqlite. In order to avoid huge memory consumption which causes OOM, this patch changes volatile writes to use normal dirty pages, instead blocked flushing to the disk as long as system does not suffer from memory pressure. 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 d6f073edd861..cabecee88377 100644
--- a/fs/f2fs/node.c
+++ b/fs/f2fs/node.c
@@ -61,6 +61,9 @@ bool available_free_memory(struct f2fs_sb_info *sbi, int type)
61 mem_size += (sbi->im[i].ino_num * 61 mem_size += (sbi->im[i].ino_num *
62 sizeof(struct ino_entry)) >> PAGE_CACHE_SHIFT; 62 sizeof(struct ino_entry)) >> PAGE_CACHE_SHIFT;
63 res = mem_size < ((avail_ram * nm_i->ram_thresh / 100) >> 1); 63 res = mem_size < ((avail_ram * nm_i->ram_thresh / 100) >> 1);
64 } else {
65 if (sbi->sb->s_bdi->dirty_exceeded)
66 return false;
64 } 67 }
65 return res; 68 return res;
66} 69}