]> git.baikalelectronics.ru Git - kernel.git/commit
block: use on-stack page vec for <= UIO_FASTIOV
authorJens Axboe <axboe@kernel.dk>
Fri, 5 Aug 2022 22:44:34 +0000 (16:44 -0600)
committerJens Axboe <axboe@kernel.dk>
Mon, 22 Aug 2022 16:07:56 +0000 (10:07 -0600)
commit417c81384e4cd6aa54818e99affe69b8311d70e7
tree63b3e0072fbd45bd78ec3b04c0973db6e61c6347
parent6d62810e370527ca8cd660fbadeefa09642e3233
block: use on-stack page vec for <= UIO_FASTIOV

Avoid a kmalloc+kfree for each page array, if we only have a few pages
that are mapped. An alloc+free for each IO is quite expensive, and
it's pretty pointless if we're only dealing with 1 or a few vecs.

Use UIO_FASTIOV like we do in other spots to set a sane limit for how
big of an IO we want to avoid allocations for.

Reviewed-by: Chaitanya Kulkarni <kch@nvidia.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
block/blk-map.c