summaryrefslogtreecommitdiffstats
path: root/sys/amd64
diff options
context:
space:
mode:
authoralc <alc@FreeBSD.org>2006-11-12 21:48:34 +0000
committeralc <alc@FreeBSD.org>2006-11-12 21:48:34 +0000
commit6093953d36a905170046a19eb1141c99b22fa802 (patch)
treec4a9c71fe86ec1dd8e45421082e59941e177807f /sys/amd64
parent68445c77f7e732fbe9d5f4b930a9f2fcd0052b3f (diff)
downloadFreeBSD-src-6093953d36a905170046a19eb1141c99b22fa802.zip
FreeBSD-src-6093953d36a905170046a19eb1141c99b22fa802.tar.gz
Make pmap_enter() responsible for setting PG_WRITEABLE instead
of its caller. (As a beneficial side-effect, a high-contention acquisition of the page queues lock in vm_fault() is eliminated.)
Diffstat (limited to 'sys/amd64')
-rw-r--r--sys/amd64/amd64/pmap.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/sys/amd64/amd64/pmap.c b/sys/amd64/amd64/pmap.c
index c1f8c8b..7a8b672 100644
--- a/sys/amd64/amd64/pmap.c
+++ b/sys/amd64/amd64/pmap.c
@@ -2357,8 +2357,10 @@ validate:
* Now validate mapping with desired protection/wiring.
*/
newpte = (pt_entry_t)(pa | PG_V);
- if ((prot & VM_PROT_WRITE) != 0)
+ if ((prot & VM_PROT_WRITE) != 0) {
newpte |= PG_RW;
+ vm_page_flag_set(m, PG_WRITEABLE);
+ }
if ((prot & VM_PROT_EXECUTE) == 0)
newpte |= pg_nx;
if (wired)
OpenPOWER on IntegriCloud