27 ms·
To check the performance of read() versus memory-mapped files with a cold cache, you should absolutely be including the actual IO. But on my closer read, they
by scottlamb 6y ago
To check the performance of read() versus memory-mapped files with a cold cache, you should absolutely be including the actual IO.
But on my closer read, they did that earlier in the article. Here they are examining the (userspace) memcpy in isolation. MAP_POPULATE is just a tool to help with that. They could get a similar effect by just looking at the second (on to Nth) call to do_mmap_test, not the first. Or just copying from heap memory to heap memory, without involving any kernel stuff at all...