Skip to content
Snippets Groups Projects
Commit b10b73c1 authored by Jens Axboe's avatar Jens Axboe
Browse files

io_uring/kbuf: recycle freed mapped buffer ring entries


Right now we stash any potentially mmap'ed provided ring buffer range
for freeing at release time, regardless of when they get unregistered.
Since we're keeping track of these ranges anyway, keep track of their
registration state as well, and use that to recycle ranges when
appropriate rather than always allocate new ones.

The lookup is a basic scan of entries, checking for the best matching
free entry.

Fixes: c392cbec ("io_uring/kbuf: defer release of mapped buffer rings")
Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
parent c392cbec
No related branches found
No related tags found
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment