3 ms·
> From man page of readahead(2), "readahead() blocks until the specified data has been read." ? What man page are you reading? The goal of readahead is to prim
by Jasper_ 9y ago
> From man page of readahead(2), "readahead() blocks until the specified data has been read."
? What man page are you reading? The goal of readahead is to prime the cache and return immediately. http://man7.org/linux/man-pages/man2/readahead.2.html http://man7.org/linux/man-pages/man2/readahead.2.html
- cturner 9y agoI quoted from this one, https://linux.die.net/man/2/readahead https://linux.die.net/man/2/readahead There is a second obstacle I have in mind, around the robustness of this. Imagine if we had an implementation of that which reliably returned quickly. But we take our time doing the subsequent read. By the time we do, the value has already been chased out of the cache. It is an edge-case, and you could probably avoid it in practice, but it would be significant effort to to verify your mechanism, and would create cognitive load.