Skip to contentSkip to conversation

block/blk-merge.c: inverted likeliness in ll_back_merge_fn()

PATCH In review Roel Kluin 2 participants 3 messages Mar 11, 2008 Block layer

lore
Share & tools
lore

Roel Kluin

author
#0 lore raw

PATCH 1/1 block/blk-merge.c: inverted likeliness in ll_back_merge_fn()

In my likely profile it appears this one is inverted.
---
Invert likeliness

---

block/blk-merge.c +1 -1
index 0f58616..b17777a 100644
@@ -305,7 +305,7 @@ int ll_back_merge_fn(struct request_queue *q, struct request *req,
 	}
 	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))
#1 lore raw
Quoted 1 line · Roel Kluin

In my likely profile it appears this one is inverted.

Depends entirely on the workload, it should be removed rather than inverted.

Signature · 1 line
Jens Axboe
author
#2 lore raw
Quoted 6 lines · Jens Axboe
Quoted 1 line · Roel Kluin

In my likely profile it appears this one is inverted.

Depends entirely on the workload, it should be removed rather than inverted.

---

---

block/blk-merge.c +1 -1
index 0f58616..7651c3b 100644
@@ -305,7 +305,7 @@ int ll_back_merge_fn(struct request_queue *q, struct request *req,
 	}
 	if (unlikely(!bio_flagged(req->biotail, BIO_SEG_VALID)))
 		blk_recount_segments(q, req->biotail);
-	if (unlikely(!bio_flagged(bio, BIO_SEG_VALID)))
+	if (!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))