Linux block layer
 help / color / mirror / Atom feed
From: Kent Overstreet <kent.overstreet@gmail.com>
To: Jens Axboe <axboe@kernel.dk>
Cc: Ming Lei <ming.lei@redhat.com>,
	Christoph Hellwig <hch@infradead.org>,
	linux-block@vger.kernel.org, Coly Li <colyli@suse.de>,
	Keith Busch <kbusch@kernel.org>,
	linux-bcache@vger.kernel.org
Subject: Re: [PATCH V4] block: optimize for small block size IO
Date: Mon, 4 Nov 2019 22:14:17 -0500	[thread overview]
Message-ID: <20191105031417.GA5872@moria.home.lan> (raw)
In-Reply-To: <c41fd177-21e7-7e36-960f-fb1f7808f3e2@kernel.dk>

On Mon, Nov 04, 2019 at 07:38:42PM -0700, Jens Axboe wrote:
> This is where my knee jerk at the initial "partial completions" and
> "should be trivial" start to kick in. I don't think they are necessarily
> hard, but they aren't free either. And you'd need to be paying that
> atomic_dec cost for every IO.

No need - you added the code to avoid that atomic dec for bi_remaining in the
common case, the same approach will work here.

> currently have to do, maybe not... If it's a clear win, then it'd be an
> interesting path to pursue. But we probably won't have that answer until
> at least a hacky version is done as proof of concept.
> 
> On the upside, it'd simplify things to just have the mapping in one
> place, when the request is setup. Though until all drivers do that
> (which I worry will be never), then we'd be stuck with both. Maybe
> that's a bit to pessimistic, should be easier now since we just have
> blk-mq.

blk_rq_map_sg isn't called from _that_ many places, I suspect once it's figured
out for one driver the rest won't be that bad.

And even if some drivers remain unconverted, I personally _much_ prefer this
approach to more special case fast paths, and I bet this approach will be faster
anyways.

Also - regarding driver allocating of the sglists, I think most high performance
drivers preallocate a pool of sglists that are all sized to what the device is
capable of.

  reply	other threads:[~2019-11-05  3:14 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
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 [this message]
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=20191105031417.GA5872@moria.home.lan \
    --to=kent.overstreet@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