diff mbox

[4/4] block: bio_remaining_done( isn't unlikely

Message ID 1457714093-21926-5-git-send-email-hch@lst.de (mailing list archive)
State Accepted, archived
Delegated to: Jens Axboe
Headers show

Commit Message

Christoph Hellwig March 11, 2016, 4:34 p.m. UTC
We use bio chaining during most I/Os these days due to the delayed
bio splitting.  Additionally XFS will start using it, and there is
a pending direct I/O rewrite also making heavy use for it.  Don't
pretend it's always unlikely, and let the branch predictor do it's
job instead.

Signed-off-by: Christoph Hellwig <hch@lst.de>
---
 block/bio.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Johannes Thumshirn March 14, 2016, 8:25 a.m. UTC | #1
On Fri, Mar 11, 2016 at 05:34:53PM +0100, Christoph Hellwig wrote:
> We use bio chaining during most I/Os these days due to the delayed
> bio splitting.  Additionally XFS will start using it, and there is
> a pending direct I/O rewrite also making heavy use for it.  Don't
> pretend it's always unlikely, and let the branch predictor do it's
> job instead.
> 
> Signed-off-by: Christoph Hellwig <hch@lst.de>

Reviewed-by: Johannes Thumshirn <jthumshirn@suse.de>
Sagi Grimberg March 14, 2016, 2:57 p.m. UTC | #2
Nit, the patch title has a redundant '(' character.

Otherwise looks good,

Reviewed-by: Sagi Grimberg <sagig@mellanox.com>
--
To unsubscribe from this list: send the line "unsubscribe linux-block" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/block/bio.c b/block/bio.c
index e4682ec..0fde6e0 100644
--- a/block/bio.c
+++ b/block/bio.c
@@ -1746,7 +1746,7 @@  static inline bool bio_remaining_done(struct bio *bio)
 void bio_endio(struct bio *bio)
 {
 again:
-	if (unlikely(!bio_remaining_done(bio)))
+	if (!bio_remaining_done(bio))
 		return;
 
 	/*