It depends. Are you using aio? O_DIRECT? write(2) gives you plenty more options and these days, it&#x27;s no less efficient than mmap.<p>The whole idea of system calls being expensive is obsolete now that we&#x27;re not using heavyweight software interrupts to implement them.<p>What the fuck do you think happens when you write to a mmap(2)ed page anyway? The kernel has to know the page is dirty somehow so that it can remember to flush it later. It learns about page dirtying by initially mapping the page read-only, letting the CPU fault when you try to write, marking the page dirty, and letting the write proceed.<p>You&#x27;re entering the kernel either way.