Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

[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)

Commit 21730eed11de42f22afcbd43f450a1872a0b5ea1, 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 (commit
5b11687924e40790deb0d5f959247ade82196665)

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>

authored by

Dave Kleikamp and committed by
Linus Torvalds
833f7329 ac7fb273

-4
-1
fs/ext2/balloc.c
··· 539 539 540 540 #endif /* EXT2FS_DEBUG */ 541 541 542 - /* Superblock must be locked */ 543 542 unsigned long ext2_count_free_blocks (struct super_block * sb) 544 543 { 545 544 struct ext2_group_desc * desc;
-1
fs/ext2/ialloc.c
··· 637 637 return ERR_PTR(err); 638 638 } 639 639 640 - /* Superblock must be locked */ 641 640 unsigned long ext2_count_free_inodes (struct super_block * sb) 642 641 { 643 642 struct ext2_group_desc *desc;
-2
fs/ext2/super.c
··· 1083 1083 unsigned long overhead; 1084 1084 int i; 1085 1085 1086 - lock_super(sb); 1087 1086 if (test_opt (sb, MINIX_DF)) 1088 1087 overhead = 0; 1089 1088 else { ··· 1123 1124 buf->f_files = le32_to_cpu(sbi->s_es->s_inodes_count); 1124 1125 buf->f_ffree = ext2_count_free_inodes (sb); 1125 1126 buf->f_namelen = EXT2_NAME_LEN; 1126 - unlock_super(sb); 1127 1127 return 0; 1128 1128 } 1129 1129