ubc_fault: use PMAP_CANFAIL. pointed by Jed Davis on tech-kern@.
This commit is contained in:
parent
69f5e94d4e
commit
6957cc2e13
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: uvm_bio.c,v 1.45 2006/04/13 02:17:42 yamt Exp $ */
|
||||
/* $NetBSD: uvm_bio.c,v 1.46 2006/05/03 15:57:35 yamt Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1998 Chuck Silvers.
|
||||
|
@ -34,7 +34,7 @@
|
|||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: uvm_bio.c,v 1.45 2006/04/13 02:17:42 yamt Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: uvm_bio.c,v 1.46 2006/05/03 15:57:35 yamt Exp $");
|
||||
|
||||
#include "opt_uvmhist.h"
|
||||
|
||||
|
@ -359,14 +359,20 @@ again:
|
|||
pg->offset < umap->writeoff ||
|
||||
pg->offset + PAGE_SIZE > umap->writeoff + umap->writelen);
|
||||
mask = rdonly ? ~VM_PROT_WRITE : VM_PROT_ALL;
|
||||
pmap_enter(ufi->orig_map->pmap, va, VM_PAGE_TO_PHYS(pg),
|
||||
prot & mask, access_type & mask);
|
||||
error = pmap_enter(ufi->orig_map->pmap, va, VM_PAGE_TO_PHYS(pg),
|
||||
prot & mask, PMAP_CANFAIL | (access_type & mask));
|
||||
uvm_lock_pageq();
|
||||
uvm_pageactivate(pg);
|
||||
uvm_unlock_pageq();
|
||||
pg->flags &= ~(PG_BUSY|PG_WANTED);
|
||||
UVM_PAGE_OWN(pg, NULL);
|
||||
simple_unlock(&uobj->vmobjlock);
|
||||
if (error) {
|
||||
UVMHIST_LOG(ubchist, "pmap_enter fail %d",
|
||||
error, 0, 0, 0);
|
||||
uvm_wait("ubc_pmfail");
|
||||
/* will refault */
|
||||
}
|
||||
}
|
||||
pmap_update(ufi->orig_map->pmap);
|
||||
return 0;
|
||||
|
|
Loading…
Reference in New Issue