4 ms·
This assumes you are doing read and write system calls, not following pointers in memory. In the Redis article, it is talking about in-memory data structures.
by lgunsch 10y ago
This assumes you are doing read and write system calls, not following pointers in memory.
In the Redis article, it is talking about in-memory data structures. The page fault happens from following a pointer to another location in memory, for example, a linked list, or a skip list. There is no read call to replace with an async read call. Your code evaluates the pointer to a page that has been swapped out, a page fault occurs, and the OS has to swap it back in for you to be able to read that memory.
You could potentially create a new signal, for page faults (maybe there is one I've never heard of), but that would still not let you continue executing from the previous location.