Earlier quoted context omitted.
Linux gives much stronger guarantees than POSIX here. I wonder if you save measurable time by skipping munmap.
Is that documented?
That being said, I could easily believe that largeish pwrite(2) calls would be comparably fast compared to mmap, since mmap needs to play with page tables, and page faults on x86 are expensive. MAP_POPULATE would also be worth trying if you’re not already using it.
I assume that copy_file_range(2) is out of the question due to relocations.