Upon further investigation, in uvm_map_pageable(), entry->protection is the
right access_type to pass to uvm_fault_wire(). This way, if the entry has VM_PROT_WRITE, and the entry is marked COW, the copy will happen immediately in uvm_fault(), as if the access were performed.
This commit is contained in:
parent
beb8d06638
commit
80de1e9903
@ -1,4 +1,4 @@
|
|||||||
/* $NetBSD: uvm_map.c,v 1.45 1999/05/26 19:16:36 thorpej Exp $ */
|
/* $NetBSD: uvm_map.c,v 1.46 1999/05/26 23:53:48 thorpej Exp $ */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 1997 Charles D. Cranor and Washington University.
|
* Copyright (c) 1997 Charles D. Cranor and Washington University.
|
||||||
@ -2169,14 +2169,8 @@ uvm_map_pageable(map, start, end, new_pageable)
|
|||||||
if (rv) {
|
if (rv) {
|
||||||
entry->wired_count--;
|
entry->wired_count--;
|
||||||
} else if (entry->wired_count == 1) {
|
} else if (entry->wired_count == 1) {
|
||||||
/*
|
|
||||||
* XXXTHORPEJ: VM_PROT_NONE. What about COW
|
|
||||||
* entries? Should we enter with max_protection
|
|
||||||
* so that we're guaranteed not even mod/ref
|
|
||||||
* emulation faults will occur?
|
|
||||||
*/
|
|
||||||
rv = uvm_fault_wire(map, entry->start, entry->end,
|
rv = uvm_fault_wire(map, entry->start, entry->end,
|
||||||
VM_PROT_NONE);
|
entry->protection);
|
||||||
if (rv) {
|
if (rv) {
|
||||||
failed = entry->start;
|
failed = entry->start;
|
||||||
entry->wired_count--;
|
entry->wired_count--;
|
||||||
|
Loading…
Reference in New Issue
Block a user