diff options
author | peter <peter@FreeBSD.org> | 2001-07-27 01:08:59 +0000 |
---|---|---|
committer | peter <peter@FreeBSD.org> | 2001-07-27 01:08:59 +0000 |
commit | 036aced92fa45d63ef648349e436e97556f5150c (patch) | |
tree | 661223816ab22ad03b6cd11c3f3145545d42aef4 /sys | |
parent | 7f68356a77f53f08003fe005f0426bb8f22a0d1f (diff) | |
download | FreeBSD-src-036aced92fa45d63ef648349e436e97556f5150c.zip FreeBSD-src-036aced92fa45d63ef648349e436e97556f5150c.tar.gz |
Make PMAP_SHPGPERPROC tunable. One shouldn't need to recompile a kernel
for this, since it is easy to run into with large systems with lots of
shared mmap space.
Obtained from: yahoo
Diffstat (limited to 'sys')
-rw-r--r-- | sys/alpha/alpha/pmap.c | 6 | ||||
-rw-r--r-- | sys/amd64/amd64/pmap.c | 6 | ||||
-rw-r--r-- | sys/i386/i386/pmap.c | 6 | ||||
-rw-r--r-- | sys/ia64/ia64/pmap.c | 5 | ||||
-rw-r--r-- | sys/powerpc/aim/mmu_oea.c | 6 | ||||
-rw-r--r-- | sys/powerpc/powerpc/mmu_oea.c | 6 | ||||
-rw-r--r-- | sys/powerpc/powerpc/pmap.c | 6 |
7 files changed, 34 insertions, 7 deletions
diff --git a/sys/alpha/alpha/pmap.c b/sys/alpha/alpha/pmap.c index 43f65e3..7f2a6e8 100644 --- a/sys/alpha/alpha/pmap.c +++ b/sys/alpha/alpha/pmap.c @@ -150,6 +150,7 @@ #include <sys/param.h> #include <sys/systm.h> +#include <sys/kernel.h> #include <sys/proc.h> #include <sys/msgbuf.h> #include <sys/vmmeter.h> @@ -639,7 +640,10 @@ pmap_init(phys_start, phys_end) void pmap_init2() { - pv_entry_max = PMAP_SHPGPERPROC * maxproc + vm_page_array_size; + int shpgperproc = PMAP_SHPGPERPROC; + + TUNABLE_INT_FETCH("vm.pmap.shpgperproc", &shpgperproc); + pv_entry_max = shpgperproc * maxproc + vm_page_array_size; pv_entry_high_water = 9 * (pv_entry_max / 10); zinitna(pvzone, &pvzone_obj, NULL, 0, pv_entry_max, ZONE_INTERRUPT, 1); } diff --git a/sys/amd64/amd64/pmap.c b/sys/amd64/amd64/pmap.c index a00bcab..f2d447f 100644 --- a/sys/amd64/amd64/pmap.c +++ b/sys/amd64/amd64/pmap.c @@ -74,6 +74,7 @@ #include <sys/param.h> #include <sys/systm.h> +#include <sys/kernel.h> #include <sys/lock.h> #include <sys/mman.h> #include <sys/msgbuf.h> @@ -504,7 +505,10 @@ pmap_init(phys_start, phys_end) void pmap_init2() { - pv_entry_max = PMAP_SHPGPERPROC * maxproc + vm_page_array_size; + int shpgperproc = PMAP_SHPGPERPROC; + + TUNABLE_INT_FETCH("vm.pmap.shpgperproc", &shpgperproc); + pv_entry_max = shpgperproc * maxproc + vm_page_array_size; pv_entry_high_water = 9 * (pv_entry_max / 10); zinitna(pvzone, &pvzone_obj, NULL, 0, pv_entry_max, ZONE_INTERRUPT, 1); } diff --git a/sys/i386/i386/pmap.c b/sys/i386/i386/pmap.c index a00bcab..f2d447f 100644 --- a/sys/i386/i386/pmap.c +++ b/sys/i386/i386/pmap.c @@ -74,6 +74,7 @@ #include <sys/param.h> #include <sys/systm.h> +#include <sys/kernel.h> #include <sys/lock.h> #include <sys/mman.h> #include <sys/msgbuf.h> @@ -504,7 +505,10 @@ pmap_init(phys_start, phys_end) void pmap_init2() { - pv_entry_max = PMAP_SHPGPERPROC * maxproc + vm_page_array_size; + int shpgperproc = PMAP_SHPGPERPROC; + + TUNABLE_INT_FETCH("vm.pmap.shpgperproc", &shpgperproc); + pv_entry_max = shpgperproc * maxproc + vm_page_array_size; pv_entry_high_water = 9 * (pv_entry_max / 10); zinitna(pvzone, &pvzone_obj, NULL, 0, pv_entry_max, ZONE_INTERRUPT, 1); } diff --git a/sys/ia64/ia64/pmap.c b/sys/ia64/ia64/pmap.c index a9619df..d5f4bbd 100644 --- a/sys/ia64/ia64/pmap.c +++ b/sys/ia64/ia64/pmap.c @@ -377,7 +377,10 @@ pmap_init(phys_start, phys_end) void pmap_init2() { - pv_entry_max = PMAP_SHPGPERPROC * maxproc + vm_page_array_size; + int shpgperproc = PMAP_SHPGPERPROC; + + TUNABLE_INT_FETCH("vm.pmap.shpgperproc", &shpgperproc); + pv_entry_max = shpgperproc * maxproc + vm_page_array_size; pv_entry_high_water = 9 * (pv_entry_max / 10); zinitna(pvzone, &pvzone_obj, NULL, 0, pv_entry_max, ZONE_INTERRUPT, 1); } diff --git a/sys/powerpc/aim/mmu_oea.c b/sys/powerpc/aim/mmu_oea.c index b7f2d05..cc28d4b 100644 --- a/sys/powerpc/aim/mmu_oea.c +++ b/sys/powerpc/aim/mmu_oea.c @@ -62,6 +62,7 @@ static const char rcsid[] = #include <sys/param.h> #include <sys/systm.h> +#include <sys/kernel.h> #include <sys/proc.h> #include <sys/malloc.h> #include <sys/msgbuf.h> @@ -1639,7 +1640,10 @@ pmap_growkernel(vm_offset_t addr) void pmap_init2() { - pv_entry_max = PMAP_SHPGPERPROC * maxproc + vm_page_array_size; + int shpgperproc = PMAP_SHPGPERPROC; + + TUNABLE_INT_FETCH("vm.pmap.shpgperproc", &shpgperproc); + pv_entry_max = shpgperproc * maxproc + vm_page_array_size; pv_entry_high_water = 9 * (pv_entry_max / 10); zinitna(pvzone, &pvzone_obj, NULL, 0, pv_entry_max, ZONE_INTERRUPT, 1); } diff --git a/sys/powerpc/powerpc/mmu_oea.c b/sys/powerpc/powerpc/mmu_oea.c index b7f2d05..cc28d4b 100644 --- a/sys/powerpc/powerpc/mmu_oea.c +++ b/sys/powerpc/powerpc/mmu_oea.c @@ -62,6 +62,7 @@ static const char rcsid[] = #include <sys/param.h> #include <sys/systm.h> +#include <sys/kernel.h> #include <sys/proc.h> #include <sys/malloc.h> #include <sys/msgbuf.h> @@ -1639,7 +1640,10 @@ pmap_growkernel(vm_offset_t addr) void pmap_init2() { - pv_entry_max = PMAP_SHPGPERPROC * maxproc + vm_page_array_size; + int shpgperproc = PMAP_SHPGPERPROC; + + TUNABLE_INT_FETCH("vm.pmap.shpgperproc", &shpgperproc); + pv_entry_max = shpgperproc * maxproc + vm_page_array_size; pv_entry_high_water = 9 * (pv_entry_max / 10); zinitna(pvzone, &pvzone_obj, NULL, 0, pv_entry_max, ZONE_INTERRUPT, 1); } diff --git a/sys/powerpc/powerpc/pmap.c b/sys/powerpc/powerpc/pmap.c index b7f2d05..cc28d4b 100644 --- a/sys/powerpc/powerpc/pmap.c +++ b/sys/powerpc/powerpc/pmap.c @@ -62,6 +62,7 @@ static const char rcsid[] = #include <sys/param.h> #include <sys/systm.h> +#include <sys/kernel.h> #include <sys/proc.h> #include <sys/malloc.h> #include <sys/msgbuf.h> @@ -1639,7 +1640,10 @@ pmap_growkernel(vm_offset_t addr) void pmap_init2() { - pv_entry_max = PMAP_SHPGPERPROC * maxproc + vm_page_array_size; + int shpgperproc = PMAP_SHPGPERPROC; + + TUNABLE_INT_FETCH("vm.pmap.shpgperproc", &shpgperproc); + pv_entry_max = shpgperproc * maxproc + vm_page_array_size; pv_entry_high_water = 9 * (pv_entry_max / 10); zinitna(pvzone, &pvzone_obj, NULL, 0, pv_entry_max, ZONE_INTERRUPT, 1); } |