3 ms·
Is there anything on this assertion that map is obsolete to dive into? That's a bold & very different claim.
by jauntywundrkind 3y ago
Is there anything on this assertion that map is obsolete to dive into? That's a bold & very different claim.
- jeffbee 3y agoIf you are just trying to get along and make your program work, there's nothing morally wrong with mmap, but it is far from optimal and optimality is where the interesting discussions happen. Making the kernel deal with your magic page tables, and asking it to infer what to evict, what to read ahead of time are not the best approach. The page fault cost did not matter much when they invented mmap, back when disk accesses took tens of milliseconds. Today it matters a great deal. Using `fio` on my system, mmap is the slowest way to access the SSD.