On 8/6/22 08:20, Jens Axboe wrote:
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.
Signed-off-by: Jens Axboe <axboe@kernel.dk>
---
block/blk-map.c | 14 +++++++++++---
1 file changed, 11 insertions(+), 3 deletions(-)
Looks good.
Reviewed-by: Chaitanya Kulkarni <kch@nvidia.com>
-ck