Re: -CURRENT kernel panic

From: Jon Noack <noackjr_at_alumni.rice.edu>
Date: Fri, 05 Mar 2004 16:11:55 -0600
On 3/5/2004 6:23 AM, Vincent Poy wrote:
> On Fri, 5 Mar 2004, Jon Noack wrote:
>> On 3/4/2004 4:13 PM, Vincent Poy wrote:
>>> On Thu, 4 Mar 2004, Andrew Gallatin wrote:
>>>> Vincent Poy writes:
>>>>> 	Interesting.  I'm still wondering what the VM_KMEM_SIZE_SCALE 
>>>>> number represents.
>>>> 
>>>> It tries to autoscale the kmem size, so that you don't need to hard 
>>>> code it.  Hardcoding it could be bad if you change the amount of ram
>>>> in the box.
>>>
>>> 	That part I understand but what exactly does the number 2 and 3 
>>> mean?
>>
>> VM_KMEM_SIZE_SCALE:
>> How many physical pages per KVA page allocated.
>> 
>> <snip>
> 
> 	I actually read that part already but is 2 basically 1/2 and 3
> actually just 1/3?

That's the way I read it -- check out this comment again (from 
src/sys/i386/include/vmparam.h -- hopefully the formatting will be ok):
 > /*
 >  * How many physical pages per KVA page allocated.
 >  * min(max(VM_KMEM_SIZE, Physical memory/VM_KMEM_SIZE_SCALE), 
VM_KMEM_SIZE_MAX)
                            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 >  * is the total KVA space allocated for kmem_map.
 >  */

VM_KMEM_SIZE_SCALE is used to autoscale the value in this range:
VM_KMEM_SIZE <= vm_kmem_size <= VM_KMEM_SIZE_MAX

This ensures we have a reasonable minimum (VM_KMEM_SIZE) and maximum 
(VM_KMEM_SIZE_MAX) while making a fair effort at efficiently utilizing 
available memory (Physical memory/VM_KMEM_SIZE_SCALE).

Jon Noack
Received on Fri Mar 05 2004 - 13:12:03 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:37:46 UTC