Skip to content

Commit

Permalink
[PATCH] remove unlikely(sb) in prune_dcache
Browse files Browse the repository at this point in the history
likely profiling shows that the following is a miss.

After boot:
[+- ] Type | # True | # False | Function:Filename@Line
+unlikely |     1074|        0  prune_dcache()@:fs/dcache.c@409

After a bonnie++ run:
+unlikely |    66716|    19584  prune_dcache()@:fs/dcache.c@409

So remove it.

Signed-off-by: Hua Zhong <hzhong@gmail.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
  • Loading branch information
Hua Zhong authored and Linus Torvalds committed Jun 25, 2006
1 parent d84a847 commit f58a1eb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion fs/dcache.c
Original file line number Diff line number Diff line change
Expand Up @@ -406,7 +406,7 @@ static void prune_dcache(int count, struct super_block *sb)
cond_resched_lock(&dcache_lock);

tmp = dentry_unused.prev;
if (unlikely(sb)) {
if (sb) {
/* Try to find a dentry for this sb, but don't try
* too hard, if they aren't near the tail they will
* be moved down again soon
Expand Down

0 comments on commit f58a1eb

Please sign in to comment.