public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] likely cleanup: revert unlikely in ll_back_merge_fn
@ 2006-04-25 18:18 Hua Zhong
  2006-04-25 18:30 ` Jens Axboe
  0 siblings, 1 reply; 10+ messages in thread
From: Hua Zhong @ 2006-04-25 18:18 UTC (permalink / raw)
  To: linux-kernel; +Cc: akpm, axboe

With likely/unlikely profiling (see the recent patch dwalker@mvista.com sent), on my not-so-busy-typical-development system it shows more than 80K misses and no hits. So I guess it makes sense to revert.

I don't know BIO code very well, but I hope this data is useful for the experts.

Signed-off-by: Hua Zhong <hzhong@gmail.com>

diff --git a/block/ll_rw_blk.c b/block/ll_rw_blk.c
index 1755c05..499da1c 100644
--- a/block/ll_rw_blk.c
+++ b/block/ll_rw_blk.c
@@ -1432,7 +1432,7 @@ static int ll_back_merge_fn(request_queu
  	}
  	if (unlikely(!bio_flagged(req->biotail, BIO_SEG_VALID)))
  		blk_recount_segments(q, req->biotail);
-	if (unlikely(!bio_flagged(bio, BIO_SEG_VALID)))
+	if (likely(!bio_flagged(bio, BIO_SEG_VALID)))
  		blk_recount_segments(q, bio);
  	len = req->biotail->bi_hw_back_size + bio->bi_hw_front_size;
  	if (BIOVEC_VIRT_MERGEABLE(__BVEC_END(req->biotail), __BVEC_START(bio)) &&

^ permalink raw reply related	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2006-05-01 20:30 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-04-25 18:18 [PATCH] likely cleanup: revert unlikely in ll_back_merge_fn Hua Zhong
2006-04-25 18:30 ` Jens Axboe
2006-04-25 21:38   ` Hua Zhong
2006-04-26  5:20     ` Jens Axboe
2006-04-26 13:50       ` James Bottomley
2006-04-26 13:55         ` Jens Axboe
2006-04-26 14:24           ` James Bottomley
2006-04-27 14:39             ` Jens Axboe
2006-04-26 17:06   ` Hua Zhong
2006-04-30 19:25   ` Pavel Machek

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox