]> git.proxmox.com Git - mirror_ubuntu-eoan-kernel.git/commit
ocfs2: Optimize inode group allocation by recording last used group.
authorTao Ma <tao.ma@oracle.com>
Tue, 24 Feb 2009 16:53:25 +0000 (00:53 +0800)
committerMark Fasheh <mfasheh@suse.com>
Fri, 3 Apr 2009 18:39:18 +0000 (11:39 -0700)
commitfeb473a6e8bd19297d0f3bb377b25055c0228c0a
tree4ceae3a185fc430c8927dc0bbb197a3694c37194
parent60ca81e82dae4aa2e8ae84cf96b4d08535931669
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>
fs/ocfs2/ocfs2.h
fs/ocfs2/suballoc.c