io_uring/memmap: optimise single folio regions
authorPavel Begunkov <asml.silence@gmail.com>
Fri, 29 Nov 2024 13:34:28 +0000 (13:34 +0000)
committerJens Axboe <axboe@kernel.dk>
Mon, 16 Dec 2024 13:58:14 +0000 (06:58 -0700)
commit086bbdf47919a6df21183e1f9549a5b44f650578
treedcc6cc8ceeb154079411879c4763af4be9c94bc5
parent94315400344adb88d765808de99a128fc8b6f00d
io_uring/memmap: optimise single folio regions

We don't need to vmap if memory is already physically contiguous. There
are two important cases it covers: PAGE_SIZE regions and huge pages.
Use io_check_coalesce_buffer() to get the number of contiguous folios.

Signed-off-by: Pavel Begunkov <asml.silence@gmail.com>
Link: https://lore.kernel.org/r/d5240af23064a824c29d14d2406f1ae764bf4505.1732886067.git.asml.silence@gmail.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
io_uring/memmap.c