提交 f58a1ebb 编写于 作者: H Hua Zhong 提交者: Linus Torvalds

[PATCH] remove unlikely(sb) in prune_dcache

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: NHua Zhong <hzhong@gmail.com>
Signed-off-by: NAndrew Morton <akpm@osdl.org>
Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
上级 d84a8477
......@@ -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
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册