Skip to contentSkip to conversation

Multiple mmap/mprotect/munmap operations in a batch?

DISCUSSION Josh Triplett 3 participants 3 messages Apr 23, 2020 – Apr 24, 2020 io_uring

lore
Share & tools
lore
#0 lore raw

What would it take for io_uring to support mmap, mprotect, and munmap operations?

What would it take to process a batch of such operations efficiently without repeatedly poking mmap_sem and such?

maintainer
#1 lore raw
Quoted 2 lines · Josh Triplett

What would it take for io_uring to support mmap, mprotect, and munmap operations?

Not very much, wiring up something like madvise as an example:

https://git.kernel.dk/cgit/linux-block/commit/?id=c1ca757bd6f4632c510714631ddcc2d13030fe1e

Quoted 2 lines

What would it take to process a batch of such operations efficiently without repeatedly poking mmap_sem and such?

Probably just a bit of refactoring, to enable calling the needed helpers with the mmap_sem already held.

Signature · 1 line
Jens Axboe
#2 lore raw

Is there any restriction as to what calls shouldn't be covered with io_uring? I see the scope is growing over time. For example would directory operations be appropriate?

Ed

Quoted 18 lines · Jens Axboe
Quoted 2 lines · Josh Triplett

What would it take for io_uring to support mmap, mprotect, and munmap operations?

Not very much, wiring up something like madvise as an example:

https://git.kernel.dk/cgit/linux-block/commit/?id=c1ca757bd6f4632c510714631ddcc2d13030fe1e

Quoted 2 lines

What would it take to process a batch of such operations efficiently without repeatedly poking mmap_sem and such?

Probably just a bit of refactoring, to enable calling the needed helpers with the mmap_sem already held.

--
Jens Axboe