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
This commit is contained in:
parent
e664fdb13c
commit
0b27d7104f
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=80431
@ -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);
|
||||
}
|
||||
|
@ -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);
|
||||
}
|
||||
|
@ -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);
|
||||
}
|
||||
|
@ -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);
|
||||
}
|
||||
|
@ -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);
|
||||
}
|
||||
|
@ -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);
|
||||
}
|
||||
|
@ -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);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user