[PATCH] likely cleanup: revert unlikely in ll_back_merge_fn

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



With likely/unlikely profiling (see the recent patch [email protected] 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 <[email protected]>

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)) &&
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux