summaryrefslogtreecommitdiffstats
path: root/sys/amd64
diff options
context:
space:
mode:
authoralc <alc@FreeBSD.org>2007-08-21 04:59:34 +0000
committeralc <alc@FreeBSD.org>2007-08-21 04:59:34 +0000
commitcbe3361efb4504ce92269266617dfcd1dc27abba (patch)
treee09e1fbbb1ae253abdd9df544be4edcfe4b34d8f /sys/amd64
parent0b8ac2d96963570ea8b4d6507ef1ecff0be0e0ba (diff)
downloadFreeBSD-src-cbe3361efb4504ce92269266617dfcd1dc27abba.zip
FreeBSD-src-cbe3361efb4504ce92269266617dfcd1dc27abba.tar.gz
In general, when we map a page into the kernel's address space, we no
longer create a pv entry for that mapping. (The two exceptions are mappings into the kernel's exec and pipe submaps.) Consequently, there is no reason for get_pv_entry() to dig deep into the free page queues, i.e., use VM_ALLOC_SYSTEM, by default. This revision changes get_pv_entry() to use VM_ALLOC_NORMAL by default, i.e., before calling pmap_collect() to reclaim pv entries. Approved by: re (kensmith)
Diffstat (limited to 'sys/amd64')
-rw-r--r--sys/amd64/amd64/pmap.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/sys/amd64/amd64/pmap.c b/sys/amd64/amd64/pmap.c
index d70fd4b..db7fc1c 100644
--- a/sys/amd64/amd64/pmap.c
+++ b/sys/amd64/amd64/pmap.c
@@ -1722,7 +1722,7 @@ get_pv_entry(pmap_t pmap, int try)
static const struct timeval printinterval = { 60, 0 };
static struct timeval lastprint;
static vm_pindex_t colour;
- int bit, field, page_req;
+ int bit, field;
pv_entry_t pv;
struct pv_chunk *pc;
vm_page_t m;
@@ -1755,8 +1755,7 @@ get_pv_entry(pmap_t pmap, int try)
}
}
/* No free items, allocate another chunk */
- page_req = try ? VM_ALLOC_NORMAL : VM_ALLOC_SYSTEM;
- m = vm_page_alloc(NULL, colour, page_req | VM_ALLOC_NOOBJ);
+ m = vm_page_alloc(NULL, colour, VM_ALLOC_NORMAL | VM_ALLOC_NOOBJ);
if (m == NULL) {
if (try) {
pv_entry_count--;
@@ -1775,7 +1774,7 @@ get_pv_entry(pmap_t pmap, int try)
PV_STAT(pmap_collect_inactive++);
pmap_collect(pmap, &vm_page_queues[PQ_INACTIVE]);
m = vm_page_alloc(NULL, colour,
- VM_ALLOC_SYSTEM | VM_ALLOC_NOOBJ);
+ VM_ALLOC_NORMAL | VM_ALLOC_NOOBJ);
if (m == NULL) {
PV_STAT(pmap_collect_active++);
pmap_collect(pmap, &vm_page_queues[PQ_ACTIVE]);
OpenPOWER on IntegriCloud