Subject: Re: UVM failure :(
To: Jonathan Stone <jonathan@DSG.Stanford.EDU>
From: Simon Burge <simonb@telstra.com.au>
List: port-pmax
Date: 11/30/1998 18:11:37
On Sat, 28 Nov 1998 19:30:27 -0800  Jonathan Stone wrote:

> 
> I was about to commit something like the following.  it makes it much
> clearer what's going on, and also where we lose if, say, maxproc gets
> bumped via sysctl.
> 
> Does this look OK?

How about the following, which is your patch and Michael's suggestion to
allow an option to override the number of PTE's for large swap?  I guess
we need to do some figures to work out what "large swap" is...

I assume all this will change when we go to pmap_new?

Simon.
--
Index: pmap.c
===================================================================
RCS file: /cvsroot/src/sys/arch/mips/mips/pmap.c,v
retrieving revision 1.44
diff -c -r1.44 pmap.c
*** pmap.c	1998/11/29 03:18:32	1.44
--- pmap.c	1998/11/30 07:11:23
***************
*** 251,262 ****
  
  	/*
  	 * Allocate a PTE table for the kernel.
- 	 * The '1024' comes from PAGER_MAP_SIZE in vm_pager_init().
- 	 * This should be kept in sync.
  	 * We also reserve space for kmem_alloc_pageable() for vm_fork().
  	 */
  	Sysmapsize = (VM_KMEM_SIZE + VM_MBUF_SIZE + VM_PHYS_SIZE +
! 		nbuf * MAXBSIZE + 16 * NCARGS) / NBPG + 1024 + 256;
  #ifdef SYSVSHM
  	Sysmapsize += shminfo.shmall;
  #endif
--- 251,280 ----
  
  	/*
  	 * Allocate a PTE table for the kernel.
  	 * We also reserve space for kmem_alloc_pageable() for vm_fork().
  	 */
  	Sysmapsize = (VM_KMEM_SIZE + VM_MBUF_SIZE + VM_PHYS_SIZE +
! 		nbuf * MAXBSIZE + 16 * NCARGS) / NBPG;
! 
! 	/*
! 	 * Allocate PTE space space for u-areas (XXX)
! 	 */
! 	Sysmapsize += maxproc * UPAGES;
! 
! 	/*
! 	 * Allocate kernel virtual-address space for swap maps.
! 	 */
! #ifdef MIPS_SWAP_SYSMAP_PTES
! 	Sysmapsize += MIPS_SWAP_SYSMAP_PTES;
! #else
! #ifdef UVM
! 	Sysmapsize += 2048;
! #else
! 	/* the '1024' comes from SWAP_MAP_SIZE in vm_pager_init(). */
! 	Sysmapsize += 1024;
! #endif
! #endif /* !MIPS_SWAP_SYSMAP_PTES */
! 
  #ifdef SYSVSHM
  	Sysmapsize += shminfo.shmall;
  #endif