summaryrefslogtreecommitdiffstats
path: root/sys/amd64
diff options
context:
space:
mode:
authordillon <dillon@FreeBSD.org>2000-05-29 22:40:54 +0000
committerdillon <dillon@FreeBSD.org>2000-05-29 22:40:54 +0000
commit82627e96a026e438a7251b0e5dc0a5322435693c (patch)
tree30efad495e652bce5e17011dd662ffce150ecd07 /sys/amd64
parent2e7f60e876b44bc7a2762fa018f17c30864bc19d (diff)
downloadFreeBSD-src-82627e96a026e438a7251b0e5dc0a5322435693c.zip
FreeBSD-src-82627e96a026e438a7251b0e5dc0a5322435693c.tar.gz
This is a cleanup patch to Peter's new OBJT_PHYS VM object type
and sysv shared memory support for it. It implements a new PG_UNMANAGED flag that has slightly different characteristics from PG_FICTICIOUS. A new sysctl, kern.ipc.shm_use_phys has been added to enable the use of physically-backed sysv shared memory rather then swap-backed. Physically backed shm segments are not tracked with PV entries, allowing programs which use a large shm segment as a rendezvous point to operate without eating an insane amount of KVM in the PV entry management. Read: Oracle. Peter's OBJT_PHYS object will also allow us to eventually implement page-table sharing and/or 4MB physical page support for such segments. We're half way there.
Diffstat (limited to 'sys/amd64')
-rw-r--r--sys/amd64/amd64/pmap.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/sys/amd64/amd64/pmap.c b/sys/amd64/amd64/pmap.c
index 5e3d6b5..7b27446 100644
--- a/sys/amd64/amd64/pmap.c
+++ b/sys/amd64/amd64/pmap.c
@@ -2095,7 +2095,8 @@ pmap_enter(pmap_t pmap, vm_offset_t va, vm_page_t m, vm_prot_t prot,
* raise IPL while manipulating pv_table since pmap_enter can be
* called at interrupt time.
*/
- if (pmap_initialized && (m->flags & PG_FICTITIOUS) == 0) {
+ if (pmap_initialized &&
+ (m->flags & (PG_FICTITIOUS|PG_UNMANAGED)) == 0) {
pmap_insert_entry(pmap, va, mpte, m);
pa |= PG_MANAGED;
}
@@ -2223,7 +2224,8 @@ retry:
* raise IPL while manipulating pv_table since pmap_enter can be
* called at interrupt time.
*/
- pmap_insert_entry(pmap, va, mpte, m);
+ if ((m->flags & (PG_FICTITIOUS|PG_UNMANAGED)) == 0)
+ pmap_insert_entry(pmap, va, mpte, m);
/*
* Increment counters
@@ -2235,7 +2237,10 @@ retry:
/*
* Now validate mapping with RO protection
*/
- *pte = pa | PG_V | PG_U | PG_MANAGED;
+ if (m->flags & (PG_FICTITIOUS|PG_UNMANAGED))
+ *pte = pa | PG_V | PG_U;
+ else
+ *pte = pa | PG_V | PG_U | PG_MANAGED;
return mpte;
}
OpenPOWER on IntegriCloud