All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jens Axboe <axboe@kernel.dk>
To: Christoph Hellwig <hch@infradead.org>, Ming Lei <ming.lei@redhat.com>
Cc: linux-block@vger.kernel.org, Coly Li <colyli@suse.de>,
	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 09:11:46 -0600	[thread overview]
Message-ID: <cb19bfd1-a751-3f2b-a9fb-c6bd1c562648@kernel.dk> (raw)
In-Reply-To: <20191029110425.GA4382@infradead.org>

On 10/29/19 5:04 AM, Christoph Hellwig wrote:
> 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;
>   	}

I used that as a hack months ago for testing, but never ran it full through
testing.

As a reference, either one of these bumps my poll performance by 3% on a
fast device that's core limited.

-- 
Jens Axboe


  reply	other threads:[~2019-10-29 15:11 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
2019-10-29 15:11   ` Jens Axboe [this message]
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=cb19bfd1-a751-3f2b-a9fb-c6bd1c562648@kernel.dk \
    --to=axboe@kernel.dk \
    --cc=colyli@suse.de \
    --cc=hch@infradead.org \
    --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.