All of lore.kernel.org
 help / color / mirror / Atom feed
From: Christoph Hellwig <hch@infradead.org>
To: Ming Lei <ming.lei@redhat.com>
Cc: Jens Axboe <axboe@kernel.dk>,
	linux-block@vger.kernel.org, Coly Li <colyli@suse.de>,
	Christoph Hellwig <hch@infradead.org>,
	Keith Busch <kbusch@kernel.org>,
	linux-bcache@vger.kernel.org
Subject: Re: [PATCH V3] block: optimize for small block size IO
Date: Tue, 29 Oct 2019 04:04:25 -0700	[thread overview]
Message-ID: <20191029110425.GA4382@infradead.org> (raw)
In-Reply-To: <20191029105125.12928-1-ming.lei@redhat.com>

I still haven't seen an explanation why this simple thing doesn't work
just as well:

diff --git a/block/blk-merge.c b/block/blk-merge.c
index 48e6725b32ee..f3073700166f 100644
--- a/block/blk-merge.c
+++ b/block/blk-merge.c
@@ -309,6 +309,11 @@ void __blk_queue_split(struct request_queue *q, struct bio **bio,
 				nr_segs);
 		break;
 	default:
+		if ((*bio)->bi_vcnt == 1 &&
+		    (*bio)->bi_io_vec[0].bv_len <= PAGE_SIZE) {
+			*nr_segs = 1;
+			return;
+		}
 		split = blk_bio_segment_split(q, *bio, &q->bio_split, nr_segs);
 		break;
 	}

  reply	other threads:[~2019-10-29 11:04 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-29 10:51 [PATCH V3] block: optimize for small block size IO Ming Lei
2019-10-29 11:04 ` Christoph Hellwig [this message]
2019-10-29 15:11   ` Jens Axboe
2019-10-30  0:21   ` Ming Lei
2019-10-30 13:54     ` Christoph Hellwig
2019-10-31  1:33       ` Ming Lei
2019-10-29 15:09 ` Bart Van Assche
2019-11-01 14:47 ` Jens Axboe

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=20191029110425.GA4382@infradead.org \
    --to=hch@infradead.org \
    --cc=axboe@kernel.dk \
    --cc=colyli@suse.de \
    --cc=kbusch@kernel.org \
    --cc=linux-bcache@vger.kernel.org \
    --cc=linux-block@vger.kernel.org \
    --cc=ming.lei@redhat.com \
    /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.