linux-block.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Ming Lei <tom.leiming@gmail.com>
To: Jens Axboe <axboe@kernel.dk>
Cc: Ming Lei <ming.lei@redhat.com>,
	linux-block <linux-block@vger.kernel.org>,
	Coly Li <colyli@suse.de>, Christoph Hellwig <hch@infradead.org>,
	Keith Busch <kbusch@kernel.org>,
	"open list:BCACHE (BLOCK LAYER CACHE)"
	<linux-bcache@vger.kernel.org>
Subject: Re: [PATCH V4] block: optimize for small block size IO
Date: Mon, 4 Nov 2019 08:01:22 +0800	[thread overview]
Message-ID: <CACVXFVNc8Prck1Bq+wgUb5OmAzPc6+q8V+kGL=vEgcAehqw3vw@mail.gmail.com> (raw)
In-Reply-To: <36786e85-fd19-0631-4acf-c9bf9468d4e1@kernel.dk>

On Sat, Nov 2, 2019 at 11:58 PM Jens Axboe <axboe@kernel.dk> wrote:
>
> On 11/2/19 8:03 AM, Jens Axboe wrote:
> > On 11/2/19 1:29 AM, Ming Lei wrote:
> >> __blk_queue_split() may be a bit heavy for small block size(such as
> >> 512B, or 4KB) IO, so introduce one flag to decide if this bio includes
> >> multiple page. And only consider to try splitting this bio in case
> >> that the multiple page flag is set.
> >>
> >> ~3% - 5% IOPS improvement can be observed on io_uring test over
> >> null_blk(MQ), and the io_uring test code is from fio/t/io_uring.c
> >>
> >> bch_bio_map() should be the only one which doesn't use bio_add_page(),
> >> so force to mark bio built via bch_bio_map() as MULTI_PAGE.
> >>
> >> RAID5 has similar usage too, however the bio is really single-page bio,
> >> so not necessary to handle it.
> >
> > Thanks Ming, applied.
>
> Actually, I took a closer look at this. I thought the BIO_MAP_USER
> overload would be ok, but that seems potentially fragile and so does
> the fact that we need to now maintain an extra state for multipage.
> Any serious objections to just doing the somewhat hacky bio->bi_vcnt
> check? With a comment I think that's more acceptable, and it doesn't
> rely on maintaining extra state. Particularly the latter is a big
> win, imho.

I am fine with checking bio->bi_vcnt with comment.

Thanks,
Ming Lei

  reply	other threads:[~2019-11-04  0:01 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-11-02  7:29 [PATCH V4] block: optimize for small block size IO Ming Lei
2019-11-02 14:03 ` Jens Axboe
2019-11-02 15:57   ` Jens Axboe
2019-11-04  0:01     ` Ming Lei [this message]
2019-11-04 18:14 ` Kent Overstreet
2019-11-04 18:15   ` Christoph Hellwig
2019-11-04 18:17     ` Kent Overstreet
2019-11-04 18:23       ` Jens Axboe
2019-11-04 18:42         ` Kent Overstreet
2019-11-05  1:11           ` Ming Lei
2019-11-05  2:11             ` Kent Overstreet
2019-11-05  2:20               ` Ming Lei
2019-11-05  2:30                 ` Kent Overstreet
2019-11-05  2:38                   ` Jens Axboe
2019-11-05  3:14                     ` Kent Overstreet
2019-11-05  3:33                       ` Jens Axboe
2019-11-05  2:46                   ` Ming Lei
2019-11-05  2:49                     ` Jens Axboe
2019-11-05  3:34                       ` Ming Lei
2019-11-05  0:44   ` Ming Lei

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='CACVXFVNc8Prck1Bq+wgUb5OmAzPc6+q8V+kGL=vEgcAehqw3vw@mail.gmail.com' \
    --to=tom.leiming@gmail.com \
    --cc=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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).