提交 d175a882 创建 作者: Austin Clements's avatar Austin Clements

Delete my concern about map/pagefault races

I got confused by our crazy for-loop retry idiom.
上级 e5d6fdb0
...@@ -477,11 +477,6 @@ again: ...@@ -477,11 +477,6 @@ again:
updatepages(pml4, e->vma_start, e->vma_end, [&needtlb](atomic<pme_t> *p) { updatepages(pml4, e->vma_start, e->vma_end, [&needtlb](atomic<pme_t> *p) {
for (;;) { for (;;) {
pme_t v = p->load(); pme_t v = p->load();
// XXX(austin) Huh? Why is it okay to skip it if it's
// locked? The page fault could be faulting in a page from
// the old VMA, in which case we need to shoot it down
// (though if it's already faulting a page from the new VMA,
// we need to *not* shoot it down).
if (v & PTE_LOCK) if (v & PTE_LOCK)
continue; continue;
if (!(v & PTE_P)) if (!(v & PTE_P))
......
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论