Subject: Re: Virtual Memory Issues on 2.0
To: Manuel Bouyer <bouyer@antioche.lip6.fr>
From: Greg A. Woods <woods@weird.com>
List: port-sparc
Date: 01/13/2005 02:30:31
[ On Wednesday, January 12, 2005 at 10:58:16 (+0100), Manuel Bouyer wrote: ]
> Subject: Re: Virtual Memory Issues on 2.0
>
> I don't know from where the 6095 comes ...

I was going to suggest that if you didn't actually use "options
NKMEMPAGES" as you thought then it would have been auto-configured to
1/4 of physmem, but that can't be right either since the default minimum
is 6MB too.  From sys/arch/sparc/include/param.h:


/*
 * Minimum and maximum sizes of the kernel malloc arena in PAGE_SIZE-sized
 * logical pages.
 */
#define NKMEMPAGES_MIN_DEFAULT  ((6 * 1024 * 1024) >> PAGE_SHIFT)
#define NKMEMPAGES_MAX_DEFAULT  ((6 * 1024 * 1024) >> PAGE_SHIFT)


(see also sys/kern/kern_malloc.c:kmeminit_nkmempages() and the related
#ifdefs near the top of the same file of course)


So if you had defined NKMEMPAGES then that should be the exact value
that it stays at, but if you had not then it should always be exactly
6MB.


On my 128MB desktop machine the 8146 comes from the 1/4 physmem rule:

hw.physmem = 133468160

133468160 / 4 / 4096 = 8146

-- 
						Greg A. Woods

H:+1 416 218-0098  W:+1 416 489-5852 x122  VE3TCP  RoboHack <woods@robohack.ca>
Planix, Inc. <woods@planix.com>          Secrets of the Weird <woods@weird.com>