From 1bbb4bd9c36f604a05de37d5fb5699ab9fc6b1ce Mon Sep 17 00:00:00 2001 From: Sahitya Tummala Date: Wed, 25 Nov 2020 16:40:26 +0530 Subject: [PATCH] block: disable multi-page bvec The multi-page bvec is resulting in the performance regression on UFS devices in sequential read test for upto ~9%. Hence, disable it as a workaround. Change-Id: I1dc3f5e710fd1c9a76f32e3144a0081df755ea26 Signed-off-by: Sahitya Tummala --- block/bio.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/block/bio.c b/block/bio.c index 0bc56d82486c..2a5e97f463ca 100644 --- a/block/bio.c +++ b/block/bio.c @@ -806,9 +806,7 @@ bool __bio_try_merge_page(struct bio *bio, struct page *page, if (bio->bi_vcnt > 0) { struct bio_vec *bv = &bio->bi_io_vec[bio->bi_vcnt - 1]; - if (page_is_mergeable(bv, page, len, off, same_page)) { - if (bio->bi_iter.bi_size > UINT_MAX - len) - return false; + if (page == bv->bv_page && off == bv->bv_offset + bv->bv_len) { bv->bv_len += len; bio->bi_iter.bi_size += len; return true;