mirror of
https://git.FreeBSD.org/src.git
synced 2024-12-15 10:17:20 +00:00
Allocate kernel page table object (kptobj) before any kmem_alloc calls.
On a system with a large amount of ram (e.g. 2G), allocation of per-page data structures (512K physical pages) could easily bust the initial kernel page table (36M), and growth of kernel page table requires kptobj.
This commit is contained in:
parent
2c9619f2a6
commit
fcf37ac337
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=42396
@ -39,7 +39,7 @@
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* from: @(#)pmap.c 7.7 (Berkeley) 5/12/91
|
||||
* $Id: pmap.c,v 1.215 1998/12/07 21:58:18 archie Exp $
|
||||
* $Id: pmap.c,v 1.216 1999/01/07 22:15:51 dt Exp $
|
||||
*/
|
||||
|
||||
/*
|
||||
@ -605,6 +605,11 @@ pmap_init(phys_start, phys_end)
|
||||
int i;
|
||||
int initial_pvs;
|
||||
|
||||
/*
|
||||
* object for kernel page table pages
|
||||
*/
|
||||
kptobj = vm_object_allocate(OBJT_DEFAULT, NKPDE);
|
||||
|
||||
/*
|
||||
* calculate the number of pv_entries needed
|
||||
*/
|
||||
@ -639,10 +644,6 @@ pmap_init(phys_start, phys_end)
|
||||
pvinit = (struct pv_entry *) kmem_alloc(kernel_map,
|
||||
initial_pvs * sizeof (struct pv_entry));
|
||||
zbootinit(pvzone, "PV ENTRY", sizeof (struct pv_entry), pvinit, pv_npg);
|
||||
/*
|
||||
* object for kernel page table pages
|
||||
*/
|
||||
kptobj = vm_object_allocate(OBJT_DEFAULT, NKPDE);
|
||||
|
||||
/*
|
||||
* Now it is safe to enable pv_table recording.
|
||||
|
@ -39,7 +39,7 @@
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* from: @(#)pmap.c 7.7 (Berkeley) 5/12/91
|
||||
* $Id: pmap.c,v 1.215 1998/12/07 21:58:18 archie Exp $
|
||||
* $Id: pmap.c,v 1.216 1999/01/07 22:15:51 dt Exp $
|
||||
*/
|
||||
|
||||
/*
|
||||
@ -605,6 +605,11 @@ pmap_init(phys_start, phys_end)
|
||||
int i;
|
||||
int initial_pvs;
|
||||
|
||||
/*
|
||||
* object for kernel page table pages
|
||||
*/
|
||||
kptobj = vm_object_allocate(OBJT_DEFAULT, NKPDE);
|
||||
|
||||
/*
|
||||
* calculate the number of pv_entries needed
|
||||
*/
|
||||
@ -639,10 +644,6 @@ pmap_init(phys_start, phys_end)
|
||||
pvinit = (struct pv_entry *) kmem_alloc(kernel_map,
|
||||
initial_pvs * sizeof (struct pv_entry));
|
||||
zbootinit(pvzone, "PV ENTRY", sizeof (struct pv_entry), pvinit, pv_npg);
|
||||
/*
|
||||
* object for kernel page table pages
|
||||
*/
|
||||
kptobj = vm_object_allocate(OBJT_DEFAULT, NKPDE);
|
||||
|
||||
/*
|
||||
* Now it is safe to enable pv_table recording.
|
||||
|
Loading…
Reference in New Issue
Block a user