]> www.infradead.org Git - users/jedix/linux-maple.git/commit
io_uring/memmap: account memory before pinning
authorPavel Begunkov <asml.silence@gmail.com>
Fri, 29 Nov 2024 13:34:26 +0000 (13:34 +0000)
committerJens Axboe <axboe@kernel.dk>
Mon, 23 Dec 2024 15:17:15 +0000 (08:17 -0700)
commitfc5f22a64649db7582f988d01651fa7d50054f90
treebce4a0fce0e03cee0889fc2cf41930326ca9454b
parent16375af32d0fd5a6398c48d2a684b3f4fbb17a8e
io_uring/memmap: account memory before pinning

Move memory accounting before page pinning. It shouldn't even try to pin
pages if it's not allowed, and accounting is also relatively
inexpensive. It also give a better code structure as we do generic
accounting and then can branch for different mapping types.

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