Subject: Re: UVM failure :(
To: Simon Burge <simonb@telstra.com.au>
From: Michael L. Hitch <mhitch@lightning.oscs.montana.edu>
List: port-pmax
Date: 11/27/1998 11:45:46
On Nov 27,  8:58pm, Simon Burge wrote:
> On Mon, 02 Nov 1998 18:58:17 +1100  matthew green wrote:
> 
> > 
> >    > i booted a UVM kernel (same very -current sources as the non-UVM kernel
> >    > i successfully booted only hours ago) on my /240 and it didn't like me:
> >    > 
> >    > root file system type: ffs
> >    > init: copying out path `/sbin/init' 11
> >    > uvm_anon_add: can not allocate 50999 anons
> >    > panic: uvm_anon_add
...
> Time for me to join the club :(
> 
> I just tried to boot a -current kernel on my /240 and got the same
> panic, also right after the root-fs was mounted (I assume init was
> running - the kernel doesn't have DEBUG on so I don't see that message).

  I send another message about this on 22 Nov.

> I got the following:
> 
> 	uvm_anon_add: can not allocate 51239 anons
> 	panic: uvm_anon_add
...
> Time to start looking - maybe it's a /240 thang :)

  Naw - I was able to get it on my 5000/25 by adding a 200MB swap partition.
The 200MB swap by itself was OK, but trying to add both the 200MB and my
original swap partition would crash.

  The problem is that UVM is allocating memory for swapctl that isn't
included in the pmax kernel virtual memory size calculations.  The Mach
VM swap used a fixed-size allocation, which is still being included.

  Try the following change to pmap.c and see if that helps.

Michael

--- pmap.c.orig Sun Nov 15 05:19:04 1998
+++ pmap.c      Mon Nov 23 11:46:59 1998
@@ -252,11 +272,17 @@
        /*
         * Allocate a PTE table for the kernel.
         * The '1024' comes from PAGER_MAP_SIZE in vm_pager_init().
+        * XXX - What about UVM???
         * 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 +
+#if 0
                nbuf * MAXBSIZE + 16 * NCARGS) / NBPG + 1024 + 256;
+#else
+               nbuf * MAXBSIZE + 16 * NCARGS) / NBPG + 2048 +
+               (maxproc * UPAGES);
+#endif
 #ifdef SYSVSHM
        Sysmapsize += shminfo.shmall;
 #endif


-- 
Michael L. Hitch			mhitch@montana.edu
Computer Consultant
Information Technology Center
Montana State University	Bozeman, MT	USA