aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ocfs2/ocfs2.h
diff options
context:
space:
mode:
authorTao Ma <tao.ma@oracle.com>2009-02-25 00:53:25 +0800
committerMark Fasheh <mfasheh@suse.com>2009-04-03 11:39:18 -0700
commitfeb473a6e8bd19297d0f3bb377b25055c0228c0a (patch)
tree4ceae3a185fc430c8927dc0bbb197a3694c37194 /fs/ocfs2/ocfs2.h
parent60ca81e82dae4aa2e8ae84cf96b4d08535931669 (diff)
downloadkernel_samsung_smdk4412-feb473a6e8bd19297d0f3bb377b25055c0228c0a.zip
kernel_samsung_smdk4412-feb473a6e8bd19297d0f3bb377b25055c0228c0a.tar.gz
kernel_samsung_smdk4412-feb473a6e8bd19297d0f3bb377b25055c0228c0a.tar.bz2
ocfs2: Optimize inode group allocation by recording last used group.
In ocfs2, the block group search looks for the "emptiest" group to allocate from. So if the allocator has many equally(or almost equally) empty groups, new block group will tend to get spread out amongst them. So we add osb_inode_alloc_group in ocfs2_super to record the last used inode allocation group. For more details, please see http://oss.oracle.com/osswiki/OCFS2/DesignDocs/InodeAllocationStrategy. I have done some basic test and the results are a ten times improvement on some cold-cache stat workloads. Signed-off-by: Tao Ma <tao.ma@oracle.com> Signed-off-by: Mark Fasheh <mfasheh@suse.com>
Diffstat (limited to 'fs/ocfs2/ocfs2.h')
-rw-r--r--fs/ocfs2/ocfs2.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/fs/ocfs2/ocfs2.h b/fs/ocfs2/ocfs2.h
index e1844d5..b65d19c 100644
--- a/fs/ocfs2/ocfs2.h
+++ b/fs/ocfs2/ocfs2.h
@@ -343,6 +343,9 @@ struct ocfs2_super
unsigned int osb_dx_mask;
u32 osb_dx_seed[4];
+
+ /* the group we used to allocate inodes. */
+ u64 osb_inode_alloc_group;
};
#define OCFS2_SB(sb) ((struct ocfs2_super *)(sb)->s_fs_info)