mbox series

[0/2] optimise bvec/bio iteration

Message ID cover.1606240077.git.asml.silence@gmail.com (mailing list archive)
Headers show
Series optimise bvec/bio iteration | expand

Message

Pavel Begunkov Nov. 24, 2020, 5:58 p.m. UTC
This adds simpler versions of bvec_iter_advance() and bio_advance_iter()
(i.e. *_single()), that are faster but work with the restriction that
@bytes shouldn't be more than available in the current bvec segment.

That covers most of bvec/bio iteration/foreach, that are massively
inlined, and thus also nicely shrinks binary.

Others non core-block users might be updated on case by case basis
(if applicable) after the change is merged.

Pavel Begunkov (2):
  block: optimise for_each_bvec() advance
  bio: optimise bvec iteration

 block/bio.c          |  4 ++--
 include/linux/bio.h  | 17 +++++++++++++++--
 include/linux/bvec.h | 20 +++++++++++++++-----
 3 files changed, 32 insertions(+), 9 deletions(-)

Comments

Jens Axboe Dec. 2, 2020, 4:47 p.m. UTC | #1
On 11/24/20 10:58 AM, Pavel Begunkov wrote:
> This adds simpler versions of bvec_iter_advance() and bio_advance_iter()
> (i.e. *_single()), that are faster but work with the restriction that
> @bytes shouldn't be more than available in the current bvec segment.
> 
> That covers most of bvec/bio iteration/foreach, that are massively
> inlined, and thus also nicely shrinks binary.
> 
> Others non core-block users might be updated on case by case basis
> (if applicable) after the change is merged.

Applied, thanks.