Specifically panic() in the case where pmap_insert_entry() fails to

get a new pv under high system load where the available pv entries
have been exhausted before the pagedaemon has a chance to wake up
to reclaim some.

Prior to this, the NULL pointer dereference ended up causing
secondary panics with rather less than useful resulting tracebacks.

Reviewed by:	alc, jhb
MFC after:	1 week
This commit is contained in:
Ade Lovett 2005-10-21 19:42:43 +00:00
parent 7fbf3da209
commit 8d228514fb
4 changed files with 8 additions and 0 deletions

View file

@ -1367,6 +1367,8 @@ pmap_insert_entry(pmap_t pmap, vm_offset_t va, vm_page_t mpte, vm_page_t m)
pv_entry_t pv;
pv = get_pv_entry();
if (pv == NULL)
panic("no pv entries: increase vm.pmap.shpgperproc");
pv->pv_va = va;
pv->pv_pmap = pmap;
pv->pv_ptem = mpte;

View file

@ -1508,6 +1508,8 @@ pmap_insert_entry(pmap_t pmap, vm_offset_t va, vm_page_t m)
pv_entry_t pv;
pv = get_pv_entry();
if (pv == NULL)
panic("no pv entries: increase vm.pmap.shpgperproc");
pv->pv_va = va;
pv->pv_pmap = pmap;

View file

@ -1510,6 +1510,8 @@ pmap_insert_entry(pmap_t pmap, vm_offset_t va, vm_page_t m)
pv_entry_t pv;
pv = get_pv_entry();
if (pv == NULL)
panic("no pv entries: increase vm.pmap.shpgperproc");
pv->pv_va = va;
pv->pv_pmap = pmap;

View file

@ -968,6 +968,8 @@ pmap_insert_entry(pmap_t pmap, vm_offset_t va, vm_page_t m)
pv_entry_t pv;
pv = get_pv_entry();
if (pv == NULL)
panic("no pv entries: increase vm.pmap.shpgperproc");
pv->pv_pmap = pmap;
pv->pv_va = va;