io_uring/rsrc: enable multi-hugepage buffer coalescing
authorChenliang Li <cliang01.li@samsung.com>
Wed, 31 Jul 2024 09:01:33 +0000 (17:01 +0800)
committerJens Axboe <axboe@kernel.dk>
Sun, 25 Aug 2024 14:27:01 +0000 (08:27 -0600)
commita8edbb424b1391b077407c75d8f5d2ede77aa70d
treefd2baccc8337044940e279524a23f42ded2b78de
parent3d6106aee4732a01a275c59ec94d05302d931c4b
io_uring/rsrc: enable multi-hugepage buffer coalescing

Add support for checking and coalescing multi-hugepage-backed fixed
buffers. The coalescing optimizes both time and space consumption caused
by mapping and storing multi-hugepage fixed buffers.

A coalescable multi-hugepage buffer should fully cover its folios
(except potentially the first and last one), and these folios should
have the same size. These requirements are for easier processing later,
also we need same size'd chunks in io_import_fixed for fast iov_iter
adjust.

Signed-off-by: Chenliang Li <cliang01.li@samsung.com>
Reviewed-by: Pavel Begunkov <asml.silence@gmail.com>
Link: https://lore.kernel.org/r/20240731090133.4106-3-cliang01.li@samsung.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
io_uring/rsrc.c
io_uring/rsrc.h