summaryrefslogtreecommitdiffstats
path: root/fs/f2fs/node.h
diff options
context:
space:
mode:
authorJaegeuk Kim <jaegeuk@kernel.org>2016-06-16 16:41:49 -0700
committerJaegeuk Kim <jaegeuk@kernel.org>2016-07-06 10:44:08 -0700
commitad4edb83143fdeef9e6fdd9daaa735b59476565b (patch)
treec2691e320b927f9dce1ae9df62875f3123f908d9 /fs/f2fs/node.h
parent52763a4b7a2112743745c5bbfe43fe6f54d4b39a (diff)
downloadlinux-ad4edb83143fdeef9e6fdd9daaa735b59476565b.tar.bz2
f2fs: produce more nids and reduce readahead nats
The readahead nat pages are more likely to be reclaimed quickly, so it'd better to gather more free nids in advance. And, let's keep some free nids as much as possible. Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Diffstat (limited to 'fs/f2fs/node.h')
-rw-r--r--fs/f2fs/node.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/fs/f2fs/node.h b/fs/f2fs/node.h
index 673ce926cf09..fc7684554b1a 100644
--- a/fs/f2fs/node.h
+++ b/fs/f2fs/node.h
@@ -15,9 +15,10 @@
#define NAT_BLOCK_OFFSET(start_nid) (start_nid / NAT_ENTRY_PER_BLOCK)
/* # of pages to perform synchronous readahead before building free nids */
-#define FREE_NID_PAGES 4
+#define FREE_NID_PAGES 8
+#define MAX_FREE_NIDS (NAT_ENTRY_PER_BLOCK * FREE_NID_PAGES)
-#define DEF_RA_NID_PAGES 4 /* # of nid pages to be readaheaded */
+#define DEF_RA_NID_PAGES 0 /* # of nid pages to be readaheaded */
/* maximum readahead size for node during getting data blocks */
#define MAX_RA_NODE 128