diff options
author | Chao Yu <chao2.yu@samsung.com> | 2015-10-12 17:08:48 +0800 |
---|---|---|
committer | Jaegeuk Kim <jaegeuk@kernel.org> | 2015-10-12 14:03:43 -0700 |
commit | ea1a29a0bdfffd56ca98335c0655308e8d7d0e22 (patch) | |
tree | 15cff3be22c03ada0cb3e5936b73ed1451645176 /fs/f2fs/node.c | |
parent | 2db2388fcf0d880bd7160264274ed873baec4f0d (diff) |
f2fs: export ra_nid_pages to sysfs
After finishing building free nid cache, we will try to readahead
asynchronously 4 more pages for the next reloading, the count of
readahead nid pages is fixed.
In some case, like SMR drive, read less sectors with fixed count
each time we trigger RA may be low efficient, since we will face
high seeking overhead, so we'd better let user to configure this
parameter from sysfs in specific workload.
Signed-off-by: Chao Yu <chao2.yu@samsung.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Diffstat (limited to 'fs/f2fs/node.c')
-rw-r--r-- | fs/f2fs/node.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/fs/f2fs/node.c b/fs/f2fs/node.c index 14f46067817a..7bcbc6e9c40d 100644 --- a/fs/f2fs/node.c +++ b/fs/f2fs/node.c @@ -1562,7 +1562,7 @@ static void build_free_nids(struct f2fs_sb_info *sbi) mutex_unlock(&curseg->curseg_mutex); ra_meta_pages(sbi, NAT_BLOCK_OFFSET(nm_i->next_scan_nid), - FREE_NID_PAGES, META_NAT, false); + nm_i->ra_nid_pages, META_NAT, false); } /* @@ -2005,6 +2005,7 @@ static int init_node_manager(struct f2fs_sb_info *sbi) nm_i->fcnt = 0; nm_i->nat_cnt = 0; nm_i->ram_thresh = DEF_RAM_THRESHOLD; + nm_i->ra_nid_pages = DEF_RA_NID_PAGES; INIT_RADIX_TREE(&nm_i->free_nid_root, GFP_ATOMIC); INIT_LIST_HEAD(&nm_i->free_nid_list); |