[PATCH] EXT2: Remove superblock lock contention in ext2_statfs
Fix a performance degradation introduced in 2.6.17. (30% degradation running dbench with 16 threads) Commit21730eed11
, which claims to make EXT2_DEBUG work again, moves the taking of the kernel lock out of debug-only code in ext2_count_free_inodes and ext2_count_free_blocks and into ext2_statfs. The same problem was fixed in ext3 by removing the lock completely (commit5b11687924
) Signed-off-by: Dave Kleikamp <shaggy@austin.ibm.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
This commit is contained in:
committed by
Linus Torvalds
parent
ac7fb273ca
commit
833f73299f
@@ -1083,7 +1083,6 @@ static int ext2_statfs (struct dentry * dentry, struct kstatfs * buf)
|
||||
unsigned long overhead;
|
||||
int i;
|
||||
|
||||
lock_super(sb);
|
||||
if (test_opt (sb, MINIX_DF))
|
||||
overhead = 0;
|
||||
else {
|
||||
@@ -1124,7 +1123,6 @@ static int ext2_statfs (struct dentry * dentry, struct kstatfs * buf)
|
||||
buf->f_files = le32_to_cpu(sbi->s_es->s_inodes_count);
|
||||
buf->f_ffree = ext2_count_free_inodes (sb);
|
||||
buf->f_namelen = EXT2_NAME_LEN;
|
||||
unlock_super(sb);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user