]> git.baikalelectronics.ru Git - kernel.git/commit
bio: don't copy bvec for direct IO
authorPavel Begunkov <asml.silence@gmail.com>
Sat, 9 Jan 2021 16:03:03 +0000 (16:03 +0000)
committerJens Axboe <axboe@kernel.dk>
Mon, 25 Jan 2021 15:58:24 +0000 (08:58 -0700)
commitf90852200ba6c00ee3d4ba2934b5d189eac14cfd
tree132b3485f416fde3c9d57e9003f826fcb5583d75
parent4ee968dc1471c1ec66e7acdaaa13d5e2875de1ac
bio: don't copy bvec for direct IO

The block layer spends quite a while in blkdev_direct_IO() to copy and
initialise bio's bvec. However, if we've already got a bvec in the input
iterator it might be reused in some cases, i.e. when new
ITER_BVEC_FLAG_FIXED flag is set. Simple tests show considerable
performance boost, and it also reduces memory footprint.

Suggested-by: Matthew Wilcox <willy@infradead.org>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Pavel Begunkov <asml.silence@gmail.com>
Reviewed-by: Ming Lei <ming.lei@redhat.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Documentation/filesystems/porting.rst
block/bio.c
include/linux/bio.h