2 ms·
> worst case an instruction could cause 21 different page faults Funny story is that this is still kind of a problem today, where a single pointer-dereference
by dragontamer 7y ago
> worst case an instruction could cause 21 different page faults
Funny story is that this is still kind of a problem today, where a single pointer-dereference may be an mmap'd file over a network over SSHD tunneled through (increasingly arbitrary indirections).
foo->next = bar->next->next can be surprisingly complicated. I don't think most programmers think to handle SIGBUS errors.
- anyfoo 7y agoNot exactly the same problem, though, since once you dereferenced one pointer, you technically don't need its page anymore. So in a truly pathological case, your bar->next->next could be "page in the page for bar, move pointer to register, throw page away, page in the page for next, move pointer to register ...". Whereas to me, it sounds like this polynomial evaluation instruction needed all the 21 pages within one (very "large") instruction, meaning you actually need to have those (again, pathological case) 21 different pages present at once? EDIT: A sibling comment mentioned keeping partial state of (apparently) single instructions instead of fully restarting them. So that might be an option, too.