All of lore.kernel.org
 help / color / mirror / Atom feed
From: Christoph Hellwig <hch@lst.de>
To: axboe@kernel.dk
Cc: linux-block@vger.kernel.org
Subject: [PATCH] block: skip the split micro-optimization for devices with chunk size
Date: Mon,  4 Nov 2019 16:06:17 -0800	[thread overview]
Message-ID: <20191105000617.26923-1-hch@lst.de> (raw)

If the devices sets a chunk size we might have to split I/O that is
smaller than a page size if it crosses the chunk boundary.  Skip the
micro-optimization for small I/Os in that case.

Fixes: b072e20f0084 ("block: merge invalidate_partitions into rescan_partitions")
Signed-off-by: Christoph Hellwig <hch@lst.de>
---
 block/blk-merge.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/block/blk-merge.c b/block/blk-merge.c
index 06eb38357b41..f22cb6251d06 100644
--- a/block/blk-merge.c
+++ b/block/blk-merge.c
@@ -317,7 +317,8 @@ void __blk_queue_split(struct request_queue *q, struct bio **bio,
 		 * are cloned, but compared to the performance impact of cloned
 		 * bios themselves the loop below doesn't matter anyway.
 		 */
-		if ((*bio)->bi_vcnt == 1 &&
+		if (!q->limits.chunk_sectors &&
+		    (*bio)->bi_vcnt == 1 &&
 		    (*bio)->bi_io_vec[0].bv_len <= PAGE_SIZE) {
 			*nr_segs = 1;
 			break;
-- 
2.20.1


             reply	other threads:[~2019-11-05  0:06 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-11-05  0:06 Christoph Hellwig [this message]
2019-11-05  0:10 ` [PATCH] block: skip the split micro-optimization for devices with chunk size Jens Axboe
2019-11-05  0:14 ` Bart Van Assche
2019-11-05  0:18   ` Christoph Hellwig

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20191105000617.26923-1-hch@lst.de \
    --to=hch@lst.de \
    --cc=axboe@kernel.dk \
    --cc=linux-block@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.