linux-block.vger.kernel.org archive mirror
 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, Omar Sandoval <osandov@fb.com>,
	Christoph Hellwig <hch@lst.de>
Subject: Re: [PATCH] block: advance by bvec's length for bio_for_each_bvec
Date: Thu, 28 Feb 2019 08:23:23 -0700	[thread overview]
Message-ID: <22539865-7c66-2d2d-2304-cd09f2a86064@kernel.dk> (raw)
In-Reply-To: <20190228135832.GA3182@infradead.org>

On 2/28/19 6:58 AM, Christoph Hellwig wrote:
> On Thu, Feb 28, 2019 at 11:24:21AM +0800, Ming Lei wrote:
>> bio_for_each_bvec is used in fast path of bio splitting and sg mapping,
>> and what we want to do is to iterate over multi-page bvecs, instead of pages.
>> However, bvec_iter_advance() is invisble for this requirement, and
>> always advance by page size.
>>
>> This way isn't efficient for multipage bvec iterator, also bvec_iter_len()
>> isn't as fast as mp_bvec_iter_len().
>>
>> So advance by multi-page bvec's length instead of page size for bio_for_each_bvec().
>>
>> More than 1% IOPS improvement can be observed in io_uring test on null_blk.
> 
> We've been there before, and I still insist that there is not good
> reason ever to clamp the iteration to page size in bvec_iter_advance.
> Callers that iterate over it already do that in the callers.
> 
> So here is a resurretion and rebase of my patch from back then to
> just do the right thing:

Care to resend as a proper patch?

-- 
Jens Axboe


      parent reply	other threads:[~2019-02-28 15:23 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-02-28  3:24 [PATCH] block: advance by bvec's length for bio_for_each_bvec Ming Lei
2019-02-28 13:00 ` Jens Axboe
2019-02-28 13:58 ` Christoph Hellwig
2019-02-28 15:20   ` Ming Lei
2019-02-28 15:23   ` Jens Axboe [this message]

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=22539865-7c66-2d2d-2304-cd09f2a86064@kernel.dk \
    --to=axboe@kernel.dk \
    --cc=hch@infradead.org \
    --cc=hch@lst.de \
    --cc=linux-block@vger.kernel.org \
    --cc=ming.lei@redhat.com \
    --cc=osandov@fb.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).