aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ext2/super.c
diff options
context:
space:
mode:
authorDave Kleikamp <shaggy@austin.ibm.com>2006-09-18 23:12:33 -0400
committerLinus Torvalds <torvalds@g5.osdl.org>2006-09-19 10:59:59 -0400
commit833f73299fdf4497af1552e219e95661f4d2cdca (patch)
tree3a8cbf486dce86116ada64d170896141ceee4692 /fs/ext2/super.c
parentac7fb273ca1d0b4fb354575bb6e101ffd09e0b54 (diff)
[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>
Diffstat (limited to 'fs/ext2/super.c')
-rw-r--r--fs/ext2/super.c2
1 files changed, 0 insertions, 2 deletions
diff --git a/fs/ext2/super.c b/fs/ext2/super.c
index ca5bfb6914d2..4286ff6330b6 100644
--- a/fs/ext2/super.c
+++ b/fs/ext2/super.c
@@ -1083,7 +1083,6 @@ static int ext2_statfs (struct dentry * dentry, struct kstatfs * buf)
1083 unsigned long overhead; 1083 unsigned long overhead;
1084 int i; 1084 int i;
1085 1085
1086 lock_super(sb);
1087 if (test_opt (sb, MINIX_DF)) 1086 if (test_opt (sb, MINIX_DF))
1088 overhead = 0; 1087 overhead = 0;
1089 else { 1088 else {
@@ -1124,7 +1123,6 @@ static int ext2_statfs (struct dentry * dentry, struct kstatfs * buf)
1124 buf->f_files = le32_to_cpu(sbi->s_es->s_inodes_count); 1123 buf->f_files = le32_to_cpu(sbi->s_es->s_inodes_count);
1125 buf->f_ffree = ext2_count_free_inodes (sb); 1124 buf->f_ffree = ext2_count_free_inodes (sb);
1126 buf->f_namelen = EXT2_NAME_LEN; 1125 buf->f_namelen = EXT2_NAME_LEN;
1127 unlock_super(sb);
1128 return 0; 1126 return 0;
1129} 1127}
1130 1128