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(-) -- 2.24.0