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, 18 Aug 2024 20:40:21 +0000 (14:40 -0600)
commit5f420152a00db89efc1a50bf2d4ba3020af3156d
treef2a7c9d4107615ba024c62e9ac8679c36869624b
parent4a002505380161a30290c14787c343287c2f188c
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