mbox series

[0/5] block optimisations

Message ID cover.1635006010.git.asml.silence@gmail.com (mailing list archive)
Headers show
Series block optimisations | expand

Message

Pavel Begunkov Oct. 23, 2021, 4:21 p.m. UTC
Another split off from the "block optimisation round" series focusing
on fops.c. It addresses Cristoph's review, the main change is
setting bvec directly instead of passing a "hint"
to bio_iov_iter_get_pages() in 3/5, and a prep patch 2/5.

I don't find a good way how to deduplicate __blkdev_direct_IO_async(),
there are small differences in implementation. If that's fine I'd
suggest to do it afterwards, anyway I want to brush up
__blkdev_direct_IO(), e.g. remove effectively unnecessary DIO_MULTI_BIO
flag.

Performance stays the same, solely 1/5 gives ~4.5 -> 4.7 MIOPS,
plus 1-2% from 3/5.

Pavel Begunkov (5):
  block: add single bio async direct IO helper
  block: refactor bio_iov_bvec_set()
  block: avoid extra iter advance with async iocb
  block: kill unused polling bits in __blkdev_direct_IO()
  block: add async version of bio_set_polled

 block/bio.c         |  37 ++++++--------
 block/fops.c        | 116 ++++++++++++++++++++++++++++++++++++--------
 include/linux/bio.h |   6 +++
 3 files changed, 116 insertions(+), 43 deletions(-)

Comments

Christoph Hellwig Oct. 25, 2021, 7:28 a.m. UTC | #1
On Sat, Oct 23, 2021 at 05:21:31PM +0100, Pavel Begunkov wrote:
> I don't find a good way how to deduplicate __blkdev_direct_IO_async(),
> there are small differences in implementation. If that's fine I'd
> suggest to do it afterwards, anyway I want to brush up
> __blkdev_direct_IO(), e.g. remove effectively unnecessary DIO_MULTI_BIO
> flag.

If we add another code path we should at last drop the DIO_MULTI_BIO
code to keep the complexity down in that function.
Jens Axboe Oct. 26, 2021, 11:30 p.m. UTC | #2
On Sat, 23 Oct 2021 17:21:31 +0100, Pavel Begunkov wrote:
> Another split off from the "block optimisation round" series focusing
> on fops.c. It addresses Cristoph's review, the main change is
> setting bvec directly instead of passing a "hint"
> to bio_iov_iter_get_pages() in 3/5, and a prep patch 2/5.
> 
> I don't find a good way how to deduplicate __blkdev_direct_IO_async(),
> there are small differences in implementation. If that's fine I'd
> suggest to do it afterwards, anyway I want to brush up
> __blkdev_direct_IO(), e.g. remove effectively unnecessary DIO_MULTI_BIO
> flag.
> 
> [...]

Applied, thanks!

[1/5] block: add single bio async direct IO helper
      (no commit info)
[2/5] block: refactor bio_iov_bvec_set()
      (no commit info)

Best regards,